Show / Hide Table of Contents

Class Tuple

Helper class that simplifies tuple inline generation

Inheritance
object
Tuple
Inherited Members
object.ToString()
object.Equals(object)
object.Equals(object, object)
object.ReferenceEquals(object, object)
object.GetHashCode()
object.GetType()
object.MemberwiseClone()
Namespace: Lokad
Assembly: Algenta.Colectica.Model.dll
Syntax
public static class Tuple
Examples

Tuple.From("Mike",1,true)

Methods

From<T1, T2>(T1, T2)

Creates Pair<TKey, TValue> out of two arguments

Declaration
public static Pair<T1, T2> From<T1, T2>(T1 first, T2 second)
Parameters
Type Name Description
T1 first

The first item.

T2 second

The second item.

Returns
Type Description
Pair<T1, T2>

New tuple instance

Type Parameters
Name Description
T1

The type of the first item.

T2

The type of the second item.

From<T1, T2, T3>(T1, T2, T3)

Creates Triple<T1, T2, T3> out of the three arguments

Declaration
public static Triple<T1, T2, T3> From<T1, T2, T3>(T1 first, T2 second, T3 third)
Parameters
Type Name Description
T1 first

The first item.

T2 second

The second item.

T3 third

The third item.

Returns
Type Description
Triple<T1, T2, T3>

New tuple instance

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.

From<T1, T2, T3, T4>(T1, T2, T3, T4)

Creates Tuple<T1, T2, T3, T4> out of four arguments

Declaration
public static Quad<T1, T2, T3, T4> From<T1, T2, T3, T4>(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.

Returns
Type Description
Quad<T1, T2, T3, T4>

New instance

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.

From<T1, T2, T3, T4, T5>(T1, T2, T3, T4, T5)

Creates Tuple<T1, T2, T3, T4> out of four arguments

Declaration
public static Tuple<T1, T2, T3, T4, T5> From<T1, T2, T3, T4, T5>(T1 first, T2 second, T3 third, T4 fourth, T5 fifth)
Parameters
Type Name Description
T1 first

The first item.

T2 second

The second item.

T3 third

The third item.

T4 fourth

The fourth item.

T5 fifth

The fifth item.

Returns
Type Description
Tuple<T1, T2, T3, T4, T5>

New instance

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.

T5

The type of the fifth item.

In this article
Back to top Generated by DocFX