Show / Hide Table of Contents

Class Tuple<T1, T2, T3, T4>

Tuple class with 4 items (also called Quadruple)

Inheritance
object
Tuple<T1, T2, T3, T4>
Quad<T1, T2, T3, T4>
Implements
IEquatable<Tuple<T1, T2, T3, T4>>
Inherited Members
object.Equals(object, object)
object.ReferenceEquals(object, object)
object.GetType()
object.MemberwiseClone()
Namespace: Lokad
Assembly: Algenta.Colectica.Model.dll
Syntax
[Serializable]
public class Tuple<T1, T2, T3, T4> : IEquatable<Tuple<T1, T2, T3, T4>>
Type Parameters
Name Description
T1

The type of the first item.

T2

The type of the second item.

T3

The type of the third item.

T4

The type of the fourth item.

Constructors

Tuple(T1, T2, T3, T4)

Initializes a new instance of the Tuple<T1, T2, T3, T4> class.

Declaration
public Tuple(T1 first, T2 second, T3 third, T4 fourth)
Parameters
Type Name Description
T1 first

The first item.

T2 second

The second item.

T3 third

The third item.

T4 fourth

The fourth item.

Properties

Item1

Gets or sets the item1.

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

The item1.

Item2

Gets or sets the item2.

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

The item2.

Item3

Gets or sets the item3.

Declaration
public T3 Item3 { get; }
Property Value
Type Description
T3

The item3.

Item4

Gets or sets the item4.

Declaration
public T4 Item4 { get; }
Property Value
Type Description
T4

The item4.

Methods

Equals(Tuple<T1, T2, T3, T4>)

Indicates whether the current object is equal to another object of the same type.

Declaration
public bool Equals(Tuple<T1, T2, T3, T4> obj)
Parameters
Type Name Description
Tuple<T1, T2, T3, T4> obj

An object to compare with this object.

Returns
Type Description
bool

true if the current object is equal to the obj parameter; otherwise, false.

Equals(object)

Determines whether the specified object is equal to the current Tuple<T1, T2, T3, T4>.

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

The object to compare with the current Tuple<T1, T2, T3, T4>.

Returns
Type Description
bool

true if the specified object is equal to the current Tuple<T1, T2, T3, T4>; otherwise, false.

Overrides
object.Equals(object)
Exceptions
Type Condition
NullReferenceException

The obj parameter is null.

GetHashCode()

Serves as a hash function for a particular type.

Declaration
public override int GetHashCode()
Returns
Type Description
int

A hash code for the current Tuple<T1, T2, T3, T4>.

Overrides
object.GetHashCode()

ToString()

Returns a string that represents the current Tuple<T1, T2, T3, T4>.

Declaration
public override string ToString()
Returns
Type Description
string

A string that represents the current Tuple<T1, T2, T3, T4>.

Overrides
object.ToString()

Operators

operator ==(Tuple<T1, T2, T3, T4>, Tuple<T1, T2, T3, T4>)

Implements the operator ==.

Declaration
public static bool operator ==(Tuple<T1, T2, T3, T4> left, Tuple<T1, T2, T3, T4> right)
Parameters
Type Name Description
Tuple<T1, T2, T3, T4> left

The left.

Tuple<T1, T2, T3, T4> right

The right.

Returns
Type Description
bool

The result of the operator.

operator !=(Tuple<T1, T2, T3, T4>, Tuple<T1, T2, T3, T4>)

Implements the operator !=.

Declaration
public static bool operator !=(Tuple<T1, T2, T3, T4> left, Tuple<T1, T2, T3, T4> right)
Parameters
Type Name Description
Tuple<T1, T2, T3, T4> left

The left.

Tuple<T1, T2, T3, T4> right

The right.

Returns
Type Description
bool

The result of the operator.

Implements

IEquatable<T>

Extension Methods

Extensions.Yield<T>(T)
TupleExtensions.Append<T1, T2, T3, T4, T5>(Tuple<T1, T2, T3, T4>, T5)
In this article
Back to top Generated by DocFX