Utility methods to create Tuple instances.
Provides a set of Tuple.Create methods so that C# type inferencing can easily be used with tuples. For example, instead of:
C# Example Tuple<int, long> a = new Tuple<int, long> (1, 2L);You can instead write:
C# Example Tuple<int, long> b = Tuple.Create (1, 2L); // or var c = Tuple.Create (1, 2L);
Namespace: Cadenza
Assembly: Cadenza (in Cadenza.dll)
Assembly Versions: 0.1.0.0
See Also: Inherited members from object.
⊟ Public Properties
⊟ Public Methods
staticCreate<T> (T) : Tuple<T> Creates a Cadenza.Tuple<T>. staticCreate<T1,T2> (T1, T2) : Tuple<T1, T2> Creates a Cadenza.Tuple<T1, T2>. staticCreate<T1,T2,T3> (T1, T2, T3) : Tuple<T1, T2, T3> Creates a Cadenza.Tuple<T1, T2, T3>. staticCreate<T1,T2,T3,T4> (T1, T2, T3, T4) : Tuple<T1, T2, T3, T4> Creates a Cadenza.Tuple<T1, T2, T3, T4>.
⊟ Create<T> Generic Method
Creates a Cadenza.Tuple<T>.
public static Tuple<T> Create<T> (T item1)⊟ See Also
⊟ Type Parameters
- T
- The first Cadenza.Tuple<T> value type.
⊟ Parameters
- item1
- The first Cadenza.Tuple<T> value.
⊟ Returns
A Cadenza.Tuple<T> initialized with the parameter values.⊟ Remarks
Documentation for this section has not yet been entered.⊟ Requirements
Namespace: Cadenza
Assembly: Cadenza (in Cadenza.dll)
Assembly Versions: 0.1.0.0
⊟ Create<T1,T2> Generic Method
Creates a Cadenza.Tuple<T1, T2>.
public static Tuple<T1, T2> Create<T1, T2> (T1 item1, T2 item2)⊟ See Also
⊟ Type Parameters
- T1
- The first Cadenza.Tuple<T1, T2> value type.
- T2
- The second Cadenza.Tuple<T1, T2> value type.
⊟ Parameters
- item1
- The first Cadenza.Tuple<T1, T2> value.
- item2
- The second Cadenza.Tuple<T1, T2> value.
⊟ Returns
A Cadenza.Tuple<T1, T2> initialized with the parameter values.⊟ Remarks
Documentation for this section has not yet been entered.⊟ Requirements
Namespace: Cadenza
Assembly: Cadenza (in Cadenza.dll)
Assembly Versions: 0.1.0.0
⊟ Create<T1,T2,T3> Generic Method
Creates a Cadenza.Tuple<T1, T2, T3>.
public static Tuple<T1, T2, T3> Create<T1, T2, T3> (T1 item1, T2 item2, T3 item3)⊟ See Also
⊟ Type Parameters
- T1
- The first Cadenza.Tuple<T1, T2, T3> value type.
- T2
- The second Cadenza.Tuple<T1, T2, T3> value type.
- T3
- The third Cadenza.Tuple<T1, T2, T3> value type.
⊟ Parameters
- item1
- The first Cadenza.Tuple<T1, T2, T3> value.
- item2
- The second Cadenza.Tuple<T1, T2, T3> value.
- item3
- The third Cadenza.Tuple<T1, T2, T3> value.
⊟ Returns
A Cadenza.Tuple<T1, T2, T3> initialized with the parameter values.⊟ Remarks
Documentation for this section has not yet been entered.⊟ Requirements
Namespace: Cadenza
Assembly: Cadenza (in Cadenza.dll)
Assembly Versions: 0.1.0.0
⊟ Create<T1,T2,T3,T4> Generic Method
Creates a Cadenza.Tuple<T1, T2, T3, T4>.
public static Tuple<T1, T2, T3, T4> Create<T1, T2, T3, T4> (T1 item1, T2 item2, T3 item3, T4 item4)⊟ See Also
⊟ Type Parameters
- T1
- The first Cadenza.Tuple<T1, T2, T3, T4> value type.
- T2
- The second Cadenza.Tuple<T1, T2, T3, T4> value type.
- T3
- The third Cadenza.Tuple<T1, T2, T3, T4> value type.
- T4
- The fourth Cadenza.Tuple<T1, T2, T3, T4> value type.
⊟ Parameters
- item1
- The first Cadenza.Tuple<T1, T2, T3, T4> value.
- item2
- The second Cadenza.Tuple<T1, T2, T3, T4> value.
- item3
- The third Cadenza.Tuple<T1, T2, T3, T4> value.
- item4
- The fourth Cadenza.Tuple<T1, T2, T3, T4> value.
⊟ Returns
A Cadenza.Tuple<T1, T2, T3, T4> initialized with the parameter values.⊟ Remarks
Documentation for this section has not yet been entered.⊟ Requirements
Namespace: Cadenza
Assembly: Cadenza (in Cadenza.dll)
Assembly Versions: 0.1.0.0
⊟ MaxValues Property
The maximum number of Tuple types provided.
public static int MaxValues { get; }⊟ Value
The maximum number of Tuple types provided.⊟ Remarks
Only tuples up to a certain "arity" are supported; for example, a Tuple<T1, T2, ..., T100> isn't supported (and won't likely ever be).
Tuple.MaxValues is the maximum number of values that the Tuple types support. If you need to support more values, then you need to either live with potential boxing and use a e.g. List<object> or nest Tuple instantiations, e.g. Tuple<int, Tuple<int, Tuple<int, Tuple<int, int>>>>. The problem with such nesting is that it becomes "unnatural" to access later elements -- t._2._2._2._2 to access the fifth value for the previous example.
⊟ Requirements
Namespace: Cadenza
Assembly: Cadenza (in Cadenza.dll)
Assembly Versions: 0.1.0.0