NAnt SDK Documentation - v0.85-nightly-2005-11-09

ResourceUtils.GetString Method (String, CultureInfo)

[This is preliminary documentation and subject to change.]

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
Missing <param> documentation for name
culture
Missing <param> documentation for 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