| Parameter | Description |
|---|---|
| other | The identifier to compare with this one. |
bool
true if both identifiers have the same culture code, ignoring case; otherwise, false.
Checks whether this identifier has the same culture code as another.
Codes are compared with an ordinal, case-insensitive comparison, so "en" and "EN" are equal.
<para>Compare two identifiers that differ only by case.</para>
using Unity.Localization;
namespace Unity.Localization.Samples { public class LocaleIdentifierEqualsExample { public bool Run() { var a = new LocaleIdentifier("en"); var b = new LocaleIdentifier("EN"); return a.Equals(b); // True } } }
| Parameter | Description |
|---|---|
| obj | The object to compare with this identifier. |
bool
true if obj is an identifier with the same culture code, ignoring case; otherwise, false.
Checks whether this identifier equals another object.
Returns false when obj is not a LocaleIdentifier. Otherwise, defers to
LocaleIdentifier.Equals for the code comparison.
<para>Compare against a boxed identifier.</para>
using Unity.Localization;
namespace Unity.Localization.Samples { public class LocaleIdentifierEqualsObjectExample { public bool Run(object other) { var identifier = new LocaleIdentifier("en"); return identifier.Equals(other); } } }