LocalizedString Class¶
A locale specific string.
- Namespace
Microsoft.Extensions.Localization
- Assemblies
- Microsoft.Extensions.Localization.Abstractions
Constructors¶
-
LocalizedString
(System.String, System.String)¶ Creates a new
Microsoft.Extensions.Localization.LocalizedString
.Arguments: - name (System.String) – The name of the string in the resource it was loaded from.
- value (System.String) – The actual string.
public LocalizedString(string name, string value)
-
LocalizedString
(System.String, System.String, System.Boolean) Creates a new
Microsoft.Extensions.Localization.LocalizedString
.Arguments: - name (System.String) – The name of the string in the resource it was loaded from.
- value (System.String) – The actual string.
- resourceNotFound (System.Boolean) – Whether the string was found in a resource. Set this to <code>false</code> to indicate an alternate string value was used.
public LocalizedString(string name, string value, bool resourceNotFound)
-
Properties¶
-
Microsoft.Extensions.Localization.LocalizedString.
Name
¶ The name of the string in the resource it was loaded from.
Return type: System.String public string Name { get; }
-
Microsoft.Extensions.Localization.LocalizedString.
ResourceNotFound
¶ Whether the string was found in a resource. If <code>false</code>, an alternate string value was used.
Return type: System.Boolean public bool ResourceNotFound { get; }
-
Microsoft.Extensions.Localization.LocalizedString.
Value
¶ The actual string.
Return type: System.String public string Value { get; }
-