public struct DoubleIndex : IEquatable<DoubleIndex>
A structure for storing two integer values.
Name | Type | Description |
---|---|---|
PrimaryIndex | int |
Gets the primary index of the DoubleIndex. |
SecondaryIndex | int |
Gets the secondary index of the DoubleIndex. |
public DoubleIndex(int primaryIndex, int secondaryIndex)
Initializes a new instance of the DoubleIndex structure.
Name | Type | Description |
---|---|---|
primaryIndex | int |
The primary index of the DoubleIndex. |
secondaryIndex | int |
The secondary index of the DoubleIndex. |
public bool Equals(DoubleIndex other)
Implementation of IEquatable<DoubleIndex>.Equals method. Use this, as it does not box input struct.
Name | Type | Description |
---|---|---|
other | object |
The other DoubleIndex to compare this DoubleIndex against. |
bool
false if the PrimaryIndex or SecondaryIndex are not equal. True otherwise.
public override bool Equals(object obj)
Override of Equals method. You shouldn't need to use this, and you should not use it since it will cause the input DoubleIndex to be boxed.
Name | Type | Description |
---|---|---|
obj | object |
The object to check this DoubleIndex against. |
bool
false if the object is not a DoubleIndex or it is but the PrimaryIndex or SecondaryIndex
of the obj is not the same as this one.
public override int GetHashCode()
Returns a hash code for this DoubleIndex.
int
The hash code of the DoubleIndex, calculated using both fields (primaryIndex and secondaryIndex).