| Parameter | Description |
|---|---|
| other | The entry reference to compare with this one. |
bool
true if both references identify the same entry; otherwise, false.
Checks whether this reference identifies the same entry as another.
References compare the way they resolve: an id reference compares by key id and ignores any key text (the id
wins during resolution too), and a name reference compares by ordinal key text. References of different forms
are not equal. Empty references are equal to each other.
<para>Compare two entry references for value equality.</para>
using Unity.Localization;
namespace Unity.Localization.Samples { public class TableEntryReferenceEqualsExample { public bool Run() { TableEntryReference a = "Menu/Start"; TableEntryReference b = 12345L; return a.Equals(b); } } }
| Parameter | Description |
|---|---|
| obj | The object to compare with this reference. |
bool
true if obj is an entry reference that identifies the same entry; otherwise, false.
Checks whether this reference equals another object.
Returns false when obj is not a TableEntryReference. Otherwise, defers to
TableEntryReference.Equals for value comparison.
<para>Compare against a boxed reference.</para>
using Unity.Localization;
namespace Unity.Localization.Samples { public class TableEntryReferenceEqualsObjectExample { public bool Run(TableEntryReference entryReference) { object boxed = (TableEntryReference)"Menu/Start"; return entryReference.Equals(boxed); } } }