ResXResourceManagerGetString(String, CultureInfo) Method

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

Definition

Namespace: KGySoft.Resources
Assembly: KGySoft.CoreLibraries (in KGySoft.CoreLibraries.dll) Version: 8.1.0
C#
public override string? GetString(
	string name,
	CultureInfo? culture
)

Parameters

name  String
The name of the resource to retrieve.
culture  CultureInfo
An object that represents the culture for which the resource is localized. If the resource is not localized for this culture, the resource manager uses fallback rules to locate an appropriate resource. If this value is , the CultureInfo object is obtained by using the CultureInfo.CurrentUICulture property.

Return Value

String
The value of the resource localized for the specified culture, or if name cannot be found in a resource set.

Implements

IExpandoResourceManagerGetString(String, CultureInfo)

Remarks

If SafeMode is and name is a non-string resource, then instead of throwing an InvalidOperationException the method returns the underlying raw XML content of the resource.

String values are not duplicated in memory, regardless the value of the CloneValues property.

Exceptions

ArgumentNullExceptionname is .
ObjectDisposedExceptionThe ResXResourceManager is already disposed.
InvalidOperationExceptionSafeMode is and the type of the resource is not String.
MissingManifestResourceExceptionNo usable set of localized resources has been found, and there are no default culture resources. For information about how to handle this exception, see the notes under Instantiating a ResXResourceManager object section of the description of the ResXResourceManager class.

See Also