Class XmlLanguage
Represents culture information for use in XML and XAML markup.
Inheritance
Inherited Members
Namespace: System.Windows.Markup
Assembly: OpenSilver.dll
Syntax
public sealed class XmlLanguage
Properties
| Improve this Doc View SourceIetfLanguageTag
Gets the string representation of the language tag.
Declaration
public string IetfLanguageTag { get; }
Property Value
Type | Description |
---|---|
System.String |
Methods
| Improve this Doc View SourceEquals(Object)
Checks for equality of an object to the current object.
Declaration
public override bool Equals(object obj)
Parameters
Type | Name | Description |
---|---|---|
System.Object | obj | The object to compare to the calling object. |
Returns
Type | Description |
---|---|
System.Boolean | true if the objects are the same object; otherwise, false. |
Overrides
GetHashCode()
Serves as a hash function for the XmlLanguage class.
Declaration
public override int GetHashCode()
Returns
Type | Description |
---|---|
System.Int32 | An integer hash value. |
Overrides
GetLanguage(String)
Returns a XmlLanguage instance, based on a string representing the language per RFC 3066.
Declaration
public static XmlLanguage GetLanguage(string ietfLanguageTag)
Parameters
Type | Name | Description |
---|---|---|
System.String | ietfLanguageTag | An RFC 3066 language string, or an empty string (""). |
Returns
Type | Description |
---|---|
XmlLanguage | A new XmlLanguage with the provided string as its IetfLanguageTag value. |
Exceptions
Type | Condition |
---|---|
System.ArgumentNullException | ietfLanguageTag is null. |
System.ArgumentException | ietfLanguageTag cannot be processed as a valid IETF language. |
Operators
| Improve this Doc View SourceEquality(XmlLanguage, XmlLanguage)
Determines whether two specified XmlLanguage objects have the same value.
Declaration
public static bool operator ==(XmlLanguage xmlLanguage1, XmlLanguage xmlLanguage2)
Parameters
Type | Name | Description |
---|---|---|
XmlLanguage | xmlLanguage1 | The first XmlLanguage to compare. |
XmlLanguage | xmlLanguage2 | The second XmlLanguage to compare. |
Returns
Type | Description |
---|---|
System.Boolean | true if the value of xmlLanguage1 is the same as the value of xmlLanguage2; otherwise, false. |
Inequality(XmlLanguage, XmlLanguage)
Determines whether two specified XmlLanguage objects have a different value.
Declaration
public static bool operator !=(XmlLanguage xmlLanguage1, XmlLanguage xmlLanguage2)
Parameters
Type | Name | Description |
---|---|---|
XmlLanguage | xmlLanguage1 | The first XmlLanguage to compare. |
XmlLanguage | xmlLanguage2 | The second XmlLanguage to compare. |
Returns
Type | Description |
---|---|
System.Boolean | true if the value of xmlLanguage1 is different from the value of xmlLanguage2; otherwise, false. |