Class LocalizableString
- Namespace
- NanoByte.Common.Collections
- Assembly
- NanoByte.Common.dll
A string with an associated language that can be XML serialized to an element with an xml:lang tag.
[Serializable]
public sealed class LocalizableString : ICloneable<LocalizableString>
- Inheritance
-
LocalizableString
- Implements
- Extension Methods
Fields
DefaultLanguage
The default language: english with an invariant country.
public static readonly CultureInfo DefaultLanguage
Field Value
Properties
Language
The language of the Value.
public CultureInfo Language { get; set; }
Property Value
Value
The actual string value to store.
public string? Value { get; set; }
Property Value
Methods
Clone()
Creates a plain copy of this string.
public LocalizableString Clone()
Returns
- LocalizableString
The cloned string.
Equals(LocalizableString?)
Indicates whether the current object is equal to another object of the same type.
public bool Equals(LocalizableString? other)
Parameters
other
LocalizableStringAn object to compare with this object.
Returns
- bool
true if the current object is equal to the
other
parameter; otherwise, false.
Equals(object?)
Determines whether the specified object is equal to the current object.
public override bool Equals(object? obj)
Parameters
obj
objectThe object to compare with the current object.
Returns
- bool
true if the specified object is equal to the current object; otherwise, false.
GetHashCode()
Serves as the default hash function.
public override int GetHashCode()
Returns
- int
A hash code for the current object.
ToString()
Returns a string that represents the current object.
public override string ToString()
Returns
- string
A string that represents the current object.
Operators
operator ==(LocalizableString?, LocalizableString?)
public static bool operator ==(LocalizableString? left, LocalizableString? right)
Parameters
left
LocalizableStringright
LocalizableString
Returns
operator !=(LocalizableString?, LocalizableString?)
public static bool operator !=(LocalizableString? left, LocalizableString? right)
Parameters
left
LocalizableStringright
LocalizableString