Humanizer.Resources
Resources Class
Provides access to the resources of Humanizer
public static class Resources
Inheritance System.Object → Resources
Methods
Resources.GetResource(string, CultureInfo) Method
Returns the value of the specified string resource
public static string GetResource(string resourceKey, System.Globalization.CultureInfo? culture=null);
Parameters
resourceKey System.String
The name of the resource to retrieve.
culture System.Globalization.CultureInfo
The culture of the resource to retrieve. If not specified, current thread's UI culture is used.
Returns
System.String
The value of the resource localized for the specified culture.
Resources.TryGetResource(string, CultureInfo, string) Method
Tries to get the value of the specified string resource, without fallback
public static bool TryGetResource(string resourceKey, System.Globalization.CultureInfo? culture, out string? result);
Parameters
resourceKey System.String
The name of the resource to retrieve.
culture System.Globalization.CultureInfo
The culture of the resource to retrieve. If not specified, current thread's UI culture is used.
result System.String
The value of the resource localized for the specified culture if found; null otherwise.
Returns
System.Boolean
true if the specified string resource was found for the given culture; otherwise, false.