Class Tuple
Provides static methods for creating tuple objects.
Tuple implementation for .NET 3.5
Inheritance
Namespace: RSG
Syntax
public class Tuple
Methods
Create<T1, T2>(T1, T2)
Create a new 2-tuple, or pair.
Declaration
public static Tuple<T1, T2> Create<T1, T2>(T1 item1, T2 item2)
Parameters
Type | Name | Description |
---|---|---|
T1 | item1 | The value of the first component of the tuple. |
T2 | item2 | The value of the second component of the tuple. |
Returns
Type | Description |
---|---|
Tuple<T1, T2> | A 2-tuple whose value is (item1, item2) |
Type Parameters
Name | Description |
---|---|
T1 | The type of the first component of the tuple. |
T2 | The type of the second component of the tuple. |
Create<T1, T2, T3>(T1, T2, T3)
Create a new 3-tuple, or triple.
Declaration
public static Tuple<T1, T2, T3> Create<T1, T2, T3>(T1 item1, T2 item2, T3 item3)
Parameters
Type | Name | Description |
---|---|---|
T1 | item1 | The value of the first component of the tuple. |
T2 | item2 | The value of the second component of the tuple. |
T3 | item3 | The value of the third component of the tuple. |
Returns
Type | Description |
---|---|
Tuple<T1, T2, T3> | A 3-tuple whose value is (item1, item2, item3) |
Type Parameters
Name | Description |
---|---|
T1 | The type of the first component of the tuple. |
T2 | The type of the second component of the tuple. |
T3 | The type of the third component of the tuple. |
Create<T1, T2, T3, T4>(T1, T2, T3, T4)
Create a new 4-tuple, or quadruple.
Declaration
public static Tuple<T1, T2, T3, T4> Create<T1, T2, T3, T4>(T1 item1, T2 item2, T3 item3, T4 item4)
Parameters
Type | Name | Description |
---|---|---|
T1 | item1 | The value of the first component of the tuple. |
T2 | item2 | The value of the second component of the tuple. |
T3 | item3 | The value of the third component of the tuple. |
T4 | item4 | The value of the fourth component of the tuple. |
Returns
Type | Description |
---|---|
Tuple<T1, T2, T3, T4> | A 3-tuple whose value is (item1, item2, item3, item4) |
Type Parameters
Name | Description |
---|---|
T1 | The type of the first component of the tuple. |
T2 | The type of the second component of the tuple. |
T3 | The type of the third component of the tuple. |
T4 | The type of the fourth component of the tuple. |