Summary
Returns the value of the specified string resource localized for
the specified culture.
- Assembly
- NAnt
.Core .dll - Namespace
- NAnt
.Core .Util - Containing Type
- ResourceUtils
Syntax
[MethodImpl(MethodImplOptions.NoInlining)]
public static string GetString(string name, CultureInfo culture)
Examples
The following example demonstrates the
GetString
method using
a specific culture.
CultureInfo culture = CultureInfo.CreateSpecificCulture("en-US");
string localizedString = ResourceUtils.GetString("String_HelloWorld", culture);
Remarks
The
GetString
method is thread-safe.
Attributes
Type | Description |
---|---|
MethodImplAttribute |
Parameters
Name | Type | Description |
---|---|---|
name | string | |
culture | CultureInfo |
Return Value
Type | Description |
---|---|
string |
A string that contains the value of the
resource localized for the specified culture.
|