NAnt SDK Documentation - v0.92

ResourceUtils.GetString Method (String, CultureInfo)

Returns the value of the specified string resource localized for the specified culture.

[Visual Basic]
Overloads Public Shared Function GetString( _
   ByVal name As String, _
   ByVal culture As CultureInfo _
) As String
[C#]
public static string GetString(
   string name,
   CultureInfo culture
);

Parameters

name
culture

Return Value

A String that contains the value of the resource localized for the specified culture.

Remarks

Note    The GetString method is thread-safe.

Example

The following example demonstrates the GetString method using a specific culture.

CultureInfo culture = CultureInfo.CreateSpecificCulture("en-US");
string localizedString = ResourceUtils.GetString("String_HelloWorld", culture);

See Also

ResourceUtils Class | NAnt.Core.Util Namespace | ResourceUtils.GetString Overload List