Struct Rec<T1,T2>

A generic record type with two fields.

Equality is defined field by field, using the Equals method inherited from System.Object (i.e. using NaturalEqualityComparer<T>).

This type is similar to KeyValuePair<K,V>, but the latter uses EqualityComparer<T>.Default to define field equality instead of NaturalEqualityComparer<T>.

Type parameters:
T1
T2

Implements

System.IEquatable<Rec<T1,T2>>, System.IFormattable, IShowable

Bases

object, System.ValueType

Field overview

X1 ,
X2

Constructor overview

Rec<T1,T2>(T1 x1, T2 x2)

Method overview

Equals(Rec<T1,T2> other) ,
Equals(object obj) ,
Finalize(), Inherited from object ,
GetHashCode() ,
GetType(), Inherited from object ,
MemberwiseClone(), Inherited from object ,
Show(System.Text.StringBuilder stringbuilder, ref int rest, System.IFormatProvider formatProvider) ,
ToString() ,
ToString(string format, System.IFormatProvider formatProvider)

Operator overview

operator !=(Rec<T1,T2> record1, Rec<T1,T2> record2) ,
operator ==(Rec<T1,T2> record1, Rec<T1,T2> record2)

Field details

T1 X1
T2 X2

Constructor details

Rec<T1,T2>(T1 x1, T2 x2)
Parameters:
x1:
x2:

Method details

F bool Equals(Rec<T1,T2> other)
Returns:
Parameters:
other:
bool Equals(object obj)
Returns:
Parameters:
obj:
int GetHashCode()
Returns:
F bool Show(System.Text.StringBuilder stringbuilder, ref int rest, System.IFormatProvider formatProvider)
Returns:
Parameters:
stringbuilder:
rest:
formatProvider:
string ToString()
Returns:
F string ToString(string format, System.IFormatProvider formatProvider)
Returns:
Parameters:
format:
formatProvider:

Operator details

S bool operator !=(Rec<T1,T2> record1, Rec<T1,T2> record2)
Returns:
Parameters:
record1:
record2:
S bool operator ==(Rec<T1,T2> record1, Rec<T1,T2> record2)
Returns:
Parameters:
record1:
record2: