IExpandoResourceSetGetString Method

Searches for a String resource with the specified name.

Definition

Namespace: KGySoft.Resources
Assembly: KGySoft.CoreLibraries (in KGySoft.CoreLibraries.dll) Version: 10.0.0
C#
string? GetString(
	string name,
	bool ignoreCase = false
)

Parameters

name  String
Name of the resource to search for.
ignoreCase  Boolean  (Optional)
Indicates whether the case of the specified name should be ignored.

Return Value

String
The String value of a resource. If SafeMode is , then an InvalidOperationException will be thrown for non-string resources. If SafeMode is , then either the raw XML value (for resources from a .resx source) or the string representation of the object (for resources from a compiled source) will be returned for non-string resources.

Exceptions

ArgumentNullExceptionname is .
ObjectDisposedExceptionThe IExpandoResourceSet is already disposed.
InvalidOperationExceptionSafeMode is and the type of the resource is not String.

See Also