Struct Pair<T>
An unordered pair of objects of the same type. Two instance with the first and second values switched
are considered equal.
Syntax
public readonly struct Pair<T> : IEquatable<Pair<T>>
Type Parameters
Name |
Description |
T |
The type of pair.
|
Constructors
Pair(T, T)
Declaration
public Pair(T first, T second)
Parameters
Type |
Name |
Description |
T |
first |
|
T |
second |
|
Properties
First
Declaration
Property Value
Second
Declaration
Property Value
Methods
Equals(Pair<T>)
Declaration
public bool Equals(Pair<T> other)
Parameters
Type |
Name |
Description |
Pair<T> |
other |
|
Returns
Equals(object)
Declaration
public override bool Equals(object obj)
Parameters
Type |
Name |
Description |
object |
obj |
|
Returns
Overrides
GetHashCode()
Declaration
public override int GetHashCode()
Returns
Overrides
Implements