Show / Hide Table of Contents

Class Tuplet<T1, T2>

Represents a 2-tuple value.

Inheritance
System.Object
Tuplet<T1, T2>
Implements
System.IEquatable<Tuplet<T1, T2>>
System.IComparable
System.IComparable<Tuplet<T1, T2>>
System.Collections.IStructuralEquatable
System.Collections.IStructuralComparable
Namespace: System
Assembly: Nuqleon.Memory.dll
Syntax
public sealed class Tuplet<T1, T2> : ValueType, ITuplet, IEquatable<Tuplet<T1, T2>>, IComparable, IComparable<Tuplet<T1, T2>>, IStructuralEquatable, IStructuralComparable
Type Parameters
Name Description
T1

Type of the tuple's first component.

T2

Type of the tuple's second component.

Constructors

Tuplet(T1, T2)

Creates a value representing a 2-tuple.

Declaration
public Tuplet(T1 item1, T2 item2)
Parameters
Type Name Description
T1 item1

Value of the tuple's first component.

T2 item2

Value of the tuple's second component.

Properties

Item1

Gets the value of the tuple's first component.

Declaration
public T1 Item1 { get; }
Property Value
Type Description
T1

Item2

Gets the value of the tuple's second component.

Declaration
public T2 Item2 { get; }
Property Value
Type Description
T2

Methods

CompareTo(Tuplet<T1, T2>)

Compares the current value with another value and returns an integer that indicates whether the current value precedes, follows, or occurs in the same position in the sort order as the other value.

Declaration
public int CompareTo(Tuplet<T1, T2> other)
Parameters
Type Name Description
Tuplet<T1, T2> other

A value to compare with this value.

Returns
Type Description
System.Int32

A value that indicates the relative order of the values being compared.

Equals(Object)

Checks whether the current value is equal to the specified object.

Declaration
public override bool Equals(object obj)
Parameters
Type Name Description
System.Object obj

The object to compare the current value against.

Returns
Type Description
System.Boolean

true if the current value is equal to the specified object; otherwise, false.

Equals(Tuplet<T1, T2>)

Checks whether the current value is equal to the specified value.

Declaration
public bool Equals(Tuplet<T1, T2> other)
Parameters
Type Name Description
Tuplet<T1, T2> other

The value to compare the current value against.

Returns
Type Description
System.Boolean

true if the current value is equal to the specified value; otherwise, false.

GetHashCode()

Gets a hash code for the current value.

Declaration
public override int GetHashCode()
Returns
Type Description
System.Int32

A hash code for the current value.

ToString()

Gets a string representation of the current value.

Declaration
public override string ToString()
Returns
Type Description
System.String

A string representation for the current value.

Operators

Equality(Tuplet<T1, T2>, Tuplet<T1, T2>)

Checks whether the specified values are equal.

Declaration
public static bool operator ==(Tuplet<T1, T2> first, Tuplet<T1, T2> second)
Parameters
Type Name Description
Tuplet<T1, T2> first

The first value to compare.

Tuplet<T1, T2> second

The second value to compare.

Returns
Type Description
System.Boolean

true if the values are equal; otherwise, false.

GreaterThan(Tuplet<T1, T2>, Tuplet<T1, T2>)

Checks whether the first value is larger than the second value.

Declaration
public static bool operator>(Tuplet<T1, T2> first, Tuplet<T1, T2> second)
Parameters
Type Name Description
Tuplet<T1, T2> first

The first value to compare.

Tuplet<T1, T2> second

The second value to compare.

Returns
Type Description
System.Boolean

true if the first value is larger than the second value; otherwise, false.

GreaterThanOrEqual(Tuplet<T1, T2>, Tuplet<T1, T2>)

Checks whether the first value is larger than or equal to the second value.

Declaration
public static bool operator >=(Tuplet<T1, T2> first, Tuplet<T1, T2> second)
Parameters
Type Name Description
Tuplet<T1, T2> first

The first value to compare.

Tuplet<T1, T2> second

The second value to compare.

Returns
Type Description
System.Boolean

true if the first value is larger than or equal to the second value; otherwise, false.

Inequality(Tuplet<T1, T2>, Tuplet<T1, T2>)

Checks whether the specified values are not equal.

Declaration
public static bool operator !=(Tuplet<T1, T2> first, Tuplet<T1, T2> second)
Parameters
Type Name Description
Tuplet<T1, T2> first

The first value to compare.

Tuplet<T1, T2> second

The second value to compare.

Returns
Type Description
System.Boolean

true if the values are not equal; otherwise, false.

LessThan(Tuplet<T1, T2>, Tuplet<T1, T2>)

Checks whether the first value is less than the second value.

Declaration
public static bool operator <(Tuplet<T1, T2> first, Tuplet<T1, T2> second)
Parameters
Type Name Description
Tuplet<T1, T2> first

The first value to compare.

Tuplet<T1, T2> second

The second value to compare.

Returns
Type Description
System.Boolean

true if the first value is less than the second value; otherwise, false.

LessThanOrEqual(Tuplet<T1, T2>, Tuplet<T1, T2>)

Checks whether the first value is less than or equal to the second value.

Declaration
public static bool operator <=(Tuplet<T1, T2> first, Tuplet<T1, T2> second)
Parameters
Type Name Description
Tuplet<T1, T2> first

The first value to compare.

Tuplet<T1, T2> second

The second value to compare.

Returns
Type Description
System.Boolean

true if the first value is less than or equal to the second value; otherwise, false.

Implements

System.IEquatable<>
System.IComparable
System.IComparable<>
System.Collections.IStructuralEquatable
System.Collections.IStructuralComparable
In This Article
Back to top Generated by DocFX