DoubleIndex Class

public struct DoubleIndex : IEquatable<DoubleIndex>

A structure for storing two integer values.

Properties

Name Type Description
PrimaryIndex int

Gets the primary index of the DoubleIndex.

SecondaryIndex int

Gets the secondary index of the DoubleIndex.

Constructors

DoubleIndex(int, int)

public DoubleIndex(int primaryIndex, int secondaryIndex)

Initializes a new instance of the DoubleIndex structure.

Parameters

Name Type Description
primaryIndex int

The primary index of the DoubleIndex.

secondaryIndex int

The secondary index of the DoubleIndex.

Methods

Equals(DoubleIndex)

public bool Equals(DoubleIndex other)

Implementation of IEquatable<DoubleIndex>.Equals method. Use this, as it does not box input struct.

Parameters

Name Type Description
other object

The other DoubleIndex to compare this DoubleIndex against.

Returns

bool
false if the PrimaryIndex or SecondaryIndex are not equal. True otherwise.


Equals(object)

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.

Parameters

Name Type Description
obj object

The object to check this DoubleIndex against.

Returns

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.


GetHashCode()

public override int GetHashCode()

Returns a hash code for this DoubleIndex.

Returns

int
The hash code of the DoubleIndex, calculated using both fields (primaryIndex and secondaryIndex).