Table of Contents

Struct Locale

Namespace
Glitch9

Versatile locale type that can be used in various ways.

[Serializable]
public readonly struct Locale : IComparable
Implements
Inherited Members
Extension Methods

Constructors

Locale(int)

public Locale(int value)

Parameters

value int

Locale(SystemLanguage)

public Locale(SystemLanguage value)

Parameters

value SystemLanguage

Properties

Default

public static Locale Default { get; }

Property Value

Locale

Unknown

public static Locale Unknown { get; }

Property Value

Locale

Value

public SystemLanguage Value { get; }

Property Value

SystemLanguage

Methods

CompareTo(object)

Compares the current instance with another object of the same type and returns an integer that indicates whether the current instance precedes, follows, or occurs in the same position in the sort order as the other object.

public int CompareTo(object obj)

Parameters

obj object

An object to compare with this instance.

Returns

int

A value that indicates the relative order of the objects being compared. The return value has these meanings:

Value Meaning
Less than zero This instance precedes obj in the sort order.
Zero This instance occurs in the same position in the sort order as obj.
Greater than zero This instance follows obj in the sort order.

Exceptions

ArgumentException

obj is not the same type as this instance.

Equals(object)

Indicates whether this instance and a specified object are equal.

public override bool Equals(object obj)

Parameters

obj object

The object to compare with the current instance.

Returns

bool

true if obj and this instance are the same type and represent the same value; otherwise, false.

GetHashCode()

Returns the hash code for this instance.

public override int GetHashCode()

Returns

int

A 32-bit signed integer that is the hash code for this instance.

ToInspectorName()

public string ToInspectorName()

Returns

string

ToString()

Returns the fully qualified type name of this instance.

public override string ToString()

Returns

string

The fully qualified type name.

Operators

operator ==(Locale, Locale)

public static bool operator ==(Locale a, Locale b)

Parameters

a Locale
b Locale

Returns

bool

operator ==(Locale, SystemLanguage)

public static bool operator ==(Locale a, SystemLanguage b)

Parameters

a Locale
b SystemLanguage

Returns

bool

operator ==(SystemLanguage, Locale)

public static bool operator ==(SystemLanguage a, Locale b)

Parameters

a SystemLanguage
b Locale

Returns

bool

explicit operator int(Locale)

public static explicit operator int(Locale locale)

Parameters

locale Locale

Returns

int

explicit operator string(Locale)

public static explicit operator string(Locale locale)

Parameters

locale Locale

Returns

string

explicit operator Locale(int)

public static explicit operator Locale(int value)

Parameters

value int

Returns

Locale

implicit operator SystemLanguage(Locale)

public static implicit operator SystemLanguage(Locale locale)

Parameters

locale Locale

Returns

SystemLanguage

implicit operator Locale(SystemLanguage)

public static implicit operator Locale(SystemLanguage language)

Parameters

language SystemLanguage

Returns

Locale

operator !=(Locale, Locale)

public static bool operator !=(Locale a, Locale b)

Parameters

a Locale
b Locale

Returns

bool

operator !=(Locale, SystemLanguage)

public static bool operator !=(Locale a, SystemLanguage b)

Parameters

a Locale
b SystemLanguage

Returns

bool

operator !=(SystemLanguage, Locale)

public static bool operator !=(SystemLanguage a, Locale b)

Parameters

a SystemLanguage
b Locale

Returns

bool