Struct Pair<T>
An unordered pair of objects of the same type. Two instance with the first and second values switched are considered equal.
Implements
System.IEquatable<T><Pair<T>>
Inherited Members
System.ValueType.ToString()
object.Equals(object, object)
object.GetType()
object.ReferenceEquals(object, object)
Namespace: InsaneScatterbrain.DataStructures
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
public T First { get; }
Property Value
Type | Description |
---|---|
T |
Second
Declaration
public T Second { get; }
Property Value
Type | Description |
---|---|
T |
Methods
Equals(Pair<T>)
Declaration
public bool Equals(Pair<T> other)
Parameters
Type | Name | Description |
---|---|---|
Pair<T> | other |
Returns
Type | Description |
---|---|
bool |
Equals(object)
Declaration
public override bool Equals(object obj)
Parameters
Type | Name | Description |
---|---|---|
object | obj |
Returns
Type | Description |
---|---|
bool |
Overrides
System.ValueType.Equals(object)
GetHashCode()
Declaration
public override int GetHashCode()
Returns
Type | Description |
---|---|
int |
Overrides
System.ValueType.GetHashCode()
Implements
System.IEquatable<T>