Tuple.Create Tuple.Create Tuple.Create Tuple.Create Method

Definición

Crea un nuevo objeto de tupla.Creates a new tuple object.

Sobrecargas

Create<T1,T2,T3,T4,T5,T6,T7,T8>(T1, T2, T3, T4, T5, T6, T7, T8) Create<T1,T2,T3,T4,T5,T6,T7,T8>(T1, T2, T3, T4, T5, T6, T7, T8) Create<T1,T2,T3,T4,T5,T6,T7,T8>(T1, T2, T3, T4, T5, T6, T7, T8) Create<T1,T2,T3,T4,T5,T6,T7,T8>(T1, T2, T3, T4, T5, T6, T7, T8)

Crea una nueva tupla de 8 u óctuple.Creates a new 8-tuple, or octuple.

Create<T1,T2,T3,T4,T5,T6,T7>(T1, T2, T3, T4, T5, T6, T7) Create<T1,T2,T3,T4,T5,T6,T7>(T1, T2, T3, T4, T5, T6, T7) Create<T1,T2,T3,T4,T5,T6,T7>(T1, T2, T3, T4, T5, T6, T7) Create<T1,T2,T3,T4,T5,T6,T7>(T1, T2, T3, T4, T5, T6, T7)

Crea una nueva tupla de 7 o séptuplo.Creates a new 7-tuple, or septuple.

Create<T1,T2,T3,T4,T5,T6>(T1, T2, T3, T4, T5, T6) Create<T1,T2,T3,T4,T5,T6>(T1, T2, T3, T4, T5, T6) Create<T1,T2,T3,T4,T5,T6>(T1, T2, T3, T4, T5, T6) Create<T1,T2,T3,T4,T5,T6>(T1, T2, T3, T4, T5, T6)

Crea una nueva tupla de 6 o séxtuplo.Creates a new 6-tuple, or sextuple.

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

Crea una nueva tupla de 5 o quíntuplo.Creates a new 5-tuple, or quintuple.

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

Crea una nueva tupla de 4 o cuádruplo.Creates a new 4-tuple, or quadruple.

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

Crea una nueva tupla de 3 o triple.Creates a new 3-tuple, or triple.

Create<T1,T2>(T1, T2) Create<T1,T2>(T1, T2) Create<T1,T2>(T1, T2) Create<T1,T2>(T1, T2)

Crea una nueva tupla de 2 o par.Creates a new 2-tuple, or pair.

Create<T1>(T1) Create<T1>(T1) Create<T1>(T1) Create<T1>(T1)

Crea una nueva tupla de 1 o singleton.Creates a new 1-tuple, or singleton.

Create<T1,T2,T3,T4,T5,T6,T7,T8>(T1, T2, T3, T4, T5, T6, T7, T8) Create<T1,T2,T3,T4,T5,T6,T7,T8>(T1, T2, T3, T4, T5, T6, T7, T8) Create<T1,T2,T3,T4,T5,T6,T7,T8>(T1, T2, T3, T4, T5, T6, T7, T8) Create<T1,T2,T3,T4,T5,T6,T7,T8>(T1, T2, T3, T4, T5, T6, T7, T8)

Crea una nueva tupla de 8 u óctuple.Creates a new 8-tuple, or octuple.

public:
generic <typename T1, typename T2, typename T3, typename T4, typename T5, typename T6, typename T7, typename T8>
 static Tuple<T1, T2, T3, T4, T5, T6, T7, Tuple<T8> ^> ^ Create(T1 item1, T2 item2, T3 item3, T4 item4, T5 item5, T6 item6, T7 item7, T8 item8);
public static Tuple<T1,T2,T3,T4,T5,T6,T7,Tuple<T8>> Create<T1,T2,T3,T4,T5,T6,T7,T8> (T1 item1, T2 item2, T3 item3, T4 item4, T5 item5, T6 item6, T7 item7, T8 item8);
static member Create : 'T1 * 'T2 * 'T3 * 'T4 * 'T5 * 'T6 * 'T7 * 'T8 -> 'T1 * 'T2 * 'T3 * 'T4 * 'T5 * 'T6 * 'T7 * 'T8
Public Shared Function Create(Of T1, T2, T3, T4, T5, T6, T7, T8) (item1 As T1, item2 As T2, item3 As T3, item4 As T4, item5 As T5, item6 As T6, item7 As T7, item8 As T8) As Tuple(Of T1, T2, T3, T4, T5, T6, T7, Tuple(Of T8))

Parámetros de tipo

T1

Tipo del primer componente de la tupla.The type of the first component of the tuple.

T2

Tipo del segundo componente de la tupla.The type of the second component of the tuple.

T3

Tipo del tercer componente de la tupla.The type of the third component of the tuple.

T4

Tipo del cuarto componente de la tupla.The type of the fourth component of the tuple.

T5

Tipo del quinto componente de la tupla.The type of the fifth component of the tuple.

T6

Tipo del sexto componente de la tupla.The type of the sixth component of the tuple.

T7

Tipo del séptimo componente de la tupla.The type of the seventh component of the tuple.

T8

Tipo del octavo componente de la tupla.The type of the eighth component of the tuple.

Parámetros

item1
T1 T1 T1 T1

Valor del primer componente de la tupla.The value of the first component of the tuple.

item2
T2 T2 T2 T2

Valor del segundo componente de la tupla.The value of the second component of the tuple.

item3
T3 T3 T3 T3

Valor del tercer componente de la tupla.The value of the third component of the tuple.

item4
T4 T4 T4 T4

Valor del cuarto componente de la tupla.The value of the fourth component of the tuple.

item5
T5 T5 T5 T5

Valor del quinto componente de la tupla.The value of the fifth component of the tuple.

item6
T6 T6 T6 T6

Valor del sexto componente de la tupla.The value of the sixth component of the tuple.

item7
T7 T7 T7 T7

Valor del séptimo componente de la tupla.The value of the seventh component of the tuple.

item8
T8 T8 T8 T8

Valor del octavo componente de la tupla.The value of the eighth component of the tuple.

Devoluciones

Tuple<T1,T2,T3,T4,T5,T6,T7,Tuple<T8>>

Tupla de 8 (óctupla) cuyo valor es (item1, item2, item3, item4, item5, item6, item7, item8).An 8-tuple (octuple) whose value is (item1, item2, item3, item4, item5, item6, item7, item8).

Ejemplos

En el ejemplo siguiente se crea una tupla de 8 cuyos componentes son números primos menores que 20.The following example creates an 8-tuple whose components are prime numbers that are less than 20.

var primes = Tuple.Create(2, 3, 5, 7, 11, 13, 17, 19);
Console.WriteLine("Prime numbers less than 20: " + 
                  "{0}, {1}, {2}, {3}, {4}, {5}, {6}, and {7}",
                  primes.Item1, primes.Item2, primes.Item3, 
                  primes.Item4, primes.Item5, primes.Item6,
                  primes.Item7, primes.Rest.Item1);
// The example displays the following output:
//    Prime numbers less than 20: 2, 3, 5, 7, 11, 13, 17, and 19
Dim primes = Tuple.Create(2, 3, 5, 7, 11, 13, 17, 19)
Console.WriteLine("Prime numbers less than 20: " + 
                  "{0}, {1}, {2}, {3}, {4}, {5}, {6}, and {7}",
                  primes.Item1, primes.Item2, primes.Item3, 
                  primes.Item4, primes.Item5, primes.Item6,
                  primes.Item7, primes.Rest.Item1)
' The example displays the following output:
'     Prime numbers less than 20: 2, 3, 5, 7, 11, 13, 17, and 19

Esto es equivalente al ejemplo siguiente, que usa el Tuple<T1,T2,T3,T4,T5,T6,T7,TRest> constructor Create de clase en lugar del método de creación de generador.This is equivalent to the following example, which uses the Tuple<T1,T2,T3,T4,T5,T6,T7,TRest> class constructor instead of the Create factory creation method. Tenga en cuenta que la Tuple<T1,T2,T3,T4,T5,T6,T7,TRest> creación de instancias de un objeto de esta manera implica mucho más código, porque debe Tuple<T1> declarar un objeto Tuple<T1,T2,T3,T4,T5,T6,T7,TRest> anidado como el octavo componente del objeto para generar un óctupla.Note that instantiating a Tuple<T1,T2,T3,T4,T5,T6,T7,TRest> object in this way involves considerably more code, because you must declare a nested Tuple<T1> object as the Tuple<T1,T2,T3,T4,T5,T6,T7,TRest> object's eighth component to produce an octuple.

var primes = new Tuple<int, int, int, int, int, int, int, 
                 Tuple<int>>(2, 3, 5, 7, 11, 13, 16, 
                 new Tuple<int>(19));
Dim primes As New Tuple(Of Integer, Integer, Integer, Integer, 
                           Integer, Integer, Integer, 
                           Tuple(Of Integer)) _
                       (2, 3, 5, 7, 11, 13, 17, 
                        New Tuple(Of Integer)(19))

Comentarios

Createes un método auxiliar al que se puede llamar para crear instancias de una tupla de 8 sin tener que especificar explícitamente los tipos de sus componentes.Create is a helper method that you can call to instantiate an 8-tuple without having to explicitly specify the types of its components.

Nota

Debe llamar Tuple<T1,T2,T3,T4,T5,T6,T7,TRest>.Tuple<T1,T2,T3,T4,T5,T6,T7,TRest> al constructor para crear una tupla con nueve componentes o más, a menos que su lenguaje proporcione una sintaxis especial para este fin.You must call the Tuple<T1,T2,T3,T4,T5,T6,T7,TRest>.Tuple<T1,T2,T3,T4,T5,T6,T7,TRest> constructor to create a tuple with nine or more components unless your language provides a special syntax for this purpose. Los métodos estáticos (Shared en Visual Basic) de la Tuple clase no se pueden usar para crear una tupla con nueve o más componentes.The static (Shared in Visual Basic) methods of the Tuple class cannot be used to create a tuple with nine or more components.

Consulte también:

Create<T1,T2,T3,T4,T5,T6,T7>(T1, T2, T3, T4, T5, T6, T7) Create<T1,T2,T3,T4,T5,T6,T7>(T1, T2, T3, T4, T5, T6, T7) Create<T1,T2,T3,T4,T5,T6,T7>(T1, T2, T3, T4, T5, T6, T7) Create<T1,T2,T3,T4,T5,T6,T7>(T1, T2, T3, T4, T5, T6, T7)

Crea una nueva tupla de 7 o séptuplo.Creates a new 7-tuple, or septuple.

public:
generic <typename T1, typename T2, typename T3, typename T4, typename T5, typename T6, typename T7>
 static Tuple<T1, T2, T3, T4, T5, T6, T7> ^ Create(T1 item1, T2 item2, T3 item3, T4 item4, T5 item5, T6 item6, T7 item7);
public static Tuple<T1,T2,T3,T4,T5,T6,T7> Create<T1,T2,T3,T4,T5,T6,T7> (T1 item1, T2 item2, T3 item3, T4 item4, T5 item5, T6 item6, T7 item7);
static member Create : 'T1 * 'T2 * 'T3 * 'T4 * 'T5 * 'T6 * 'T7 -> 'T1 * 'T2 * 'T3 * 'T4 * 'T5 * 'T6 * 'T7
Public Shared Function Create(Of T1, T2, T3, T4, T5, T6, T7) (item1 As T1, item2 As T2, item3 As T3, item4 As T4, item5 As T5, item6 As T6, item7 As T7) As Tuple(Of T1, T2, T3, T4, T5, T6, T7)

Parámetros de tipo

T1

Tipo del primer componente de la tupla.The type of the first component of the tuple.

T2

Tipo del segundo componente de la tupla.The type of the second component of the tuple.

T3

Tipo del tercer componente de la tupla.The type of the third component of the tuple.

T4

Tipo del cuarto componente de la tupla.The type of the fourth component of the tuple.

T5

Tipo del quinto componente de la tupla.The type of the fifth component of the tuple.

T6

Tipo del sexto componente de la tupla.The type of the sixth component of the tuple.

T7

Tipo del séptimo componente de la tupla.The type of the seventh component of the tuple.

Parámetros

item1
T1 T1 T1 T1

Valor del primer componente de la tupla.The value of the first component of the tuple.

item2
T2 T2 T2 T2

Valor del segundo componente de la tupla.The value of the second component of the tuple.

item3
T3 T3 T3 T3

Valor del tercer componente de la tupla.The value of the third component of the tuple.

item4
T4 T4 T4 T4

Valor del cuarto componente de la tupla.The value of the fourth component of the tuple.

item5
T5 T5 T5 T5

Valor del quinto componente de la tupla.The value of the fifth component of the tuple.

item6
T6 T6 T6 T6

Valor del sexto componente de la tupla.The value of the sixth component of the tuple.

item7
T7 T7 T7 T7

Valor del séptimo componente de la tupla.The value of the seventh component of the tuple.

Devoluciones

Una tupla de 7 cuyo valor es (item1, item2, item3, item4, item5, item6, item7).A 7-tuple whose value is (item1, item2, item3, item4, item5, item6, item7).

Comentarios

Createes un método auxiliar al que se puede llamar para crear instancias de un objeto de tupla de 7 sin tener que especificar explícitamente los tipos de sus componentes.Create is a helper method that you can call to instantiate a 7-tuple object without having to explicitly specify the types of its components. En el ejemplo siguiente se Create usa el método para crear una instancia de una tupla de 7.The following example uses the Create method to instantiate a 7-tuple.

var tuple7 = Tuple.Create("Jane", 90, 87, 93, 67, 100, 92);
Console.WriteLine("Test scores for {0}: {1}, {2}, {3}, {4}, {5}, {6}",
                  tuple7.Item1, tuple7.Item2, tuple7.Item3,
                  tuple7.Item4, tuple7.Item5, tuple7.Item6,
                  tuple7.Item7);
// Displays Test scores for Jane: 90, 87, 93, 67, 100, 92
Dim tuple7 = Tuple.Create("Jane", 90, 87, 93, 67, 100, 92)
Console.WriteLine("Test scores for {0}: {1}, {2}, {3}, {4}, {5}, {6}",
                  tuple7.Item1, tuple7.Item2, tuple7.Item3,
                  tuple7.Item4, tuple7.Item5, tuple7.Item6,
                  tuple7.Item7)
' Displays Test scores for Jane: 90, 87, 93, 67, 100, 92

Este código es equivalente a la siguiente llamada al Tuple<T1,T2,T3,T4,T5,T6,T7> constructor de clase.This code is equivalent to the following call to the Tuple<T1,T2,T3,T4,T5,T6,T7> class constructor.

var tuple7 = new Tuple<string, int, int, int, int, int, int>
                      ("Jane", 90, 87, 93, 67, 100, 92);
Console.WriteLine("Test scores for {0}: {1}, {2}, {3}, {4}, {5}, {6}",
                  tuple7.Item1, tuple7.Item2, tuple7.Item3,
                  tuple7.Item4, tuple7.Item5, tuple7.Item6,
                  tuple7.Item7);
// Displays Test scores for Jane: 90, 87, 93, 67, 100, 92
Dim tuple7 = New Tuple(Of String, Integer, Integer, 
                       Integer, Integer, Integer, Integer) _
                       ("Jane", 90, 87, 93, 67, 100, 92)
Console.WriteLine("Test scores for {0}: {1}, {2}, {3}, {4}, {5}, {6}",
                  tuple7.Item1, tuple7.Item2, tuple7.Item3,
                  tuple7.Item4, tuple7.Item5, tuple7.Item6,
                  tuple7.Item7)
' Displays Test scores for Jane: 90, 87, 93, 67, 100, 92
Consulte también:

Create<T1,T2,T3,T4,T5,T6>(T1, T2, T3, T4, T5, T6) Create<T1,T2,T3,T4,T5,T6>(T1, T2, T3, T4, T5, T6) Create<T1,T2,T3,T4,T5,T6>(T1, T2, T3, T4, T5, T6) Create<T1,T2,T3,T4,T5,T6>(T1, T2, T3, T4, T5, T6)

Crea una nueva tupla de 6 o séxtuplo.Creates a new 6-tuple, or sextuple.

public:
generic <typename T1, typename T2, typename T3, typename T4, typename T5, typename T6>
 static Tuple<T1, T2, T3, T4, T5, T6> ^ Create(T1 item1, T2 item2, T3 item3, T4 item4, T5 item5, T6 item6);
public static Tuple<T1,T2,T3,T4,T5,T6> Create<T1,T2,T3,T4,T5,T6> (T1 item1, T2 item2, T3 item3, T4 item4, T5 item5, T6 item6);
static member Create : 'T1 * 'T2 * 'T3 * 'T4 * 'T5 * 'T6 -> 'T1 * 'T2 * 'T3 * 'T4 * 'T5 * 'T6
Public Shared Function Create(Of T1, T2, T3, T4, T5, T6) (item1 As T1, item2 As T2, item3 As T3, item4 As T4, item5 As T5, item6 As T6) As Tuple(Of T1, T2, T3, T4, T5, T6)

Parámetros de tipo

T1

Tipo del primer componente de la tupla.The type of the first component of the tuple.

T2

Tipo del segundo componente de la tupla.The type of the second component of the tuple.

T3

Tipo del tercer componente de la tupla.The type of the third component of the tuple.

T4

Tipo del cuarto componente de la tupla.The type of the fourth component of the tuple.

T5

Tipo del quinto componente de la tupla.The type of the fifth component of the tuple.

T6

Tipo del sexto componente de la tupla.The type of the sixth component of the tuple.

Parámetros

item1
T1 T1 T1 T1

Valor del primer componente de la tupla.The value of the first component of the tuple.

item2
T2 T2 T2 T2

Valor del segundo componente de la tupla.The value of the second component of the tuple.

item3
T3 T3 T3 T3

Valor del tercer componente de la tupla.The value of the third component of the tuple.

item4
T4 T4 T4 T4

Valor del cuarto componente de la tupla.The value of the fourth component of the tuple.

item5
T5 T5 T5 T5

Valor del quinto componente de la tupla.The value of the fifth component of the tuple.

item6
T6 T6 T6 T6

Valor del sexto componente de la tupla.The value of the sixth component of the tuple.

Devoluciones

Una tupla de 6 cuyo valor es (item1, item2, item3, item4, item5, item6).A 6-tuple whose value is (item1, item2, item3, item4, item5, item6).

Comentarios

Createes un método auxiliar al que se puede llamar para crear instancias de un objeto de tupla de 6 sin tener que especificar explícitamente los tipos de sus componentes.Create is a helper method that you can call to instantiate a 6-tuple object without having to explicitly specify the types of its components. En el ejemplo siguiente se Create usa el método para crear una instancia de una tupla de 6.The following example uses the Create method to instantiate a 6-tuple.

var tuple6 = Tuple.Create("Jane", 90, 87, 93, 67, 100);
Console.WriteLine("Test scores for {0}: {1}, {2}, {3}, {4}, {5}",
                  tuple6.Item1, tuple6.Item2, tuple6.Item3,
                  tuple6.Item4, tuple6.Item5, tuple6.Item6);
// Displays Test scores for Jane: 90, 87, 93, 67, 100
Dim tuple6 = Tuple.Create("Jane", 90, 87, 93, 67, 100)
Console.WriteLine("Test scores for {0}: {1}, {2}, {3}, {4}, {5}",
                  tuple6.Item1, tuple6.Item2, tuple6.Item3,
                  tuple6.Item4, tuple6.Item5, tuple6.Item6)
' Displays Test scores for Jane: 90, 87, 93, 67, 100

Este código es equivalente a la siguiente llamada al Tuple<T1,T2,T3,T4,T5,T6> constructor de clase.This code is equivalent to the following call to the Tuple<T1,T2,T3,T4,T5,T6> class constructor.

var tuple6 = new Tuple<string, int, int, int, int, int>
                      ("Jane", 90, 87, 93, 67, 100);
Console.WriteLine("Test scores for {0}: {1}, {2}, {3}, {4}, {5}",
                  tuple6.Item1, tuple6.Item2, tuple6.Item3,
                  tuple6.Item4, tuple6.Item5, tuple6.Item6);
// Displays Test scores for Jane: 90, 87, 93, 67, 100
Dim tuple6 = New Tuple(Of String, Integer, Integer, Integer, 
                       Integer, Integer) _
                       ("Jane", 90, 87, 93, 67, 100)
Console.WriteLine("Test scores for {0}: {1}, {2}, {3}, {4}, {5}",
                  tuple6.Item1, tuple6.Item2, tuple6.Item3,
                  tuple6.Item4, tuple6.Item5, tuple6.Item6)
' Displays Test scores for Jane: 90, 87, 93, 67, 100
Consulte también:

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

Crea una nueva tupla de 5 o quíntuplo.Creates a new 5-tuple, or quintuple.

public:
generic <typename T1, typename T2, typename T3, typename T4, typename T5>
 static Tuple<T1, T2, T3, T4, T5> ^ Create(T1 item1, T2 item2, T3 item3, T4 item4, T5 item5);
public static Tuple<T1,T2,T3,T4,T5> Create<T1,T2,T3,T4,T5> (T1 item1, T2 item2, T3 item3, T4 item4, T5 item5);
static member Create : 'T1 * 'T2 * 'T3 * 'T4 * 'T5 -> 'T1 * 'T2 * 'T3 * 'T4 * 'T5
Public Shared Function Create(Of T1, T2, T3, T4, T5) (item1 As T1, item2 As T2, item3 As T3, item4 As T4, item5 As T5) As Tuple(Of T1, T2, T3, T4, T5)

Parámetros de tipo

T1

Tipo del primer componente de la tupla.The type of the first component of the tuple.

T2

Tipo del segundo componente de la tupla.The type of the second component of the tuple.

T3

Tipo del tercer componente de la tupla.The type of the third component of the tuple.

T4

Tipo del cuarto componente de la tupla.The type of the fourth component of the tuple.

T5

Tipo del quinto componente de la tupla.The type of the fifth component of the tuple.

Parámetros

item1
T1 T1 T1 T1

Valor del primer componente de la tupla.The value of the first component of the tuple.

item2
T2 T2 T2 T2

Valor del segundo componente de la tupla.The value of the second component of the tuple.

item3
T3 T3 T3 T3

Valor del tercer componente de la tupla.The value of the third component of the tuple.

item4
T4 T4 T4 T4

Valor del cuarto componente de la tupla.The value of the fourth component of the tuple.

item5
T5 T5 T5 T5

Valor del quinto componente de la tupla.The value of the fifth component of the tuple.

Devoluciones

Una tupla de 5 cuyo valor es (item1, item2, item3, item4, item5).A 5-tuple whose value is (item1, item2, item3, item4, item5).

Comentarios

Createes un método auxiliar al que se puede llamar para crear instancias de un objeto de tupla de 5 sin tener que especificar explícitamente los tipos de sus componentes.Create is a helper method that you can call to instantiate a 5-tuple object without having to explicitly specify the types of its components. En el ejemplo siguiente se Create usa el método para crear una instancia de una tupla de 5.The following example uses the Create method to instantiate a 5-tuple.

var tuple5 = Tuple.Create("New York", 1990, 7322564, 2000, 8008278);
Console.WriteLine("{0}: {1:N0} in {2}, {3:N0} in {4}",
                  tuple5.Item1, tuple5.Item3, tuple5.Item2,
                  tuple5.Item5, tuple5.Item4);
// Displays New York: 7,322,564 in 1990, 8,008,278 in 2000
Dim tuple5 = Tuple.Create("New York", 1990, 7322564, 2000, 
                          8008278)
Console.WriteLine("{0}: {1:N0} in {2}, {3:N0} in {4}",
                  tuple5.Item1, tuple5.Item3, tuple5.Item2,
                  tuple5.Item5, tuple5.Item4)
' Displays New York: 7,322,564 in 1990, 8,008,278 in 2000

Este código es equivalente a la siguiente llamada al Tuple<T1,T2,T3,T4,T5> constructor de clase.This code is equivalent to the following call to the Tuple<T1,T2,T3,T4,T5> class constructor.

var tuple5 = new Tuple<string, int, int, int, int>
                      ("New York", 1990, 7322564, 2000, 8008278);
Console.WriteLine("{0}: {1:N0} in {2}, {3:N0} in {4}",
                  tuple5.Item1, tuple5.Item3, tuple5.Item2,
                  tuple5.Item5, tuple5.Item4);
// Displays New York: 7,322,564 in 1990, 8,008,278 in 2000
Dim tuple5 = New Tuple(Of String, Integer, Integer, 
                       Integer, Integer) _
                       ("New York", 1990, 7322564, 2000, 8008278)
Console.WriteLine("{0}: {1:N0} in {2}, {3:N0} in {4}",
                  tuple5.Item1, tuple5.Item3, tuple5.Item2,
                  tuple5.Item5, tuple5.Item4)
' Displays New York: 7,322,564 in 1990, 8,008,278 in 2000
Consulte también:

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

Crea una nueva tupla de 4 o cuádruplo.Creates a new 4-tuple, or quadruple.

public:
generic <typename T1, typename T2, typename T3, typename T4>
 static Tuple<T1, T2, T3, T4> ^ Create(T1 item1, T2 item2, T3 item3, T4 item4);
public static Tuple<T1,T2,T3,T4> Create<T1,T2,T3,T4> (T1 item1, T2 item2, T3 item3, T4 item4);
static member Create : 'T1 * 'T2 * 'T3 * 'T4 -> 'T1 * 'T2 * 'T3 * 'T4
Public Shared Function Create(Of T1, T2, T3, T4) (item1 As T1, item2 As T2, item3 As T3, item4 As T4) As Tuple(Of T1, T2, T3, T4)

Parámetros de tipo

T1

Tipo del primer componente de la tupla.The type of the first component of the tuple.

T2

Tipo del segundo componente de la tupla.The type of the second component of the tuple.

T3

Tipo del tercer componente de la tupla.The type of the third component of the tuple.

T4

Tipo del cuarto componente de la tupla.The type of the fourth component of the tuple.

Parámetros

item1
T1 T1 T1 T1

Valor del primer componente de la tupla.The value of the first component of the tuple.

item2
T2 T2 T2 T2

Valor del segundo componente de la tupla.The value of the second component of the tuple.

item3
T3 T3 T3 T3

Valor del tercer componente de la tupla.The value of the third component of the tuple.

item4
T4 T4 T4 T4

Valor del cuarto componente de la tupla.The value of the fourth component of the tuple.

Devoluciones

Una tupla de 4 cuyo valor es (item1, item2, item3, item4).A 4-tuple whose value is (item1, item2, item3, item4).

Comentarios

Createes un método auxiliar al que se puede llamar para crear instancias de un objeto de tupla de 4 sin tener que especificar explícitamente los tipos de sus componentes.Create is a helper method that you can call to instantiate a 4-tuple object without having to explicitly specify the types of its components. En el ejemplo siguiente se Create usa el método para crear una instancia de una tupla de 4.The following example uses the Create method to instantiate a 4-tuple.

var tuple4 = Tuple.Create("New York", 32.68, 51.87, 76.3);
Console.WriteLine("{0}: Hi {1}, Lo {2}, Ave {3}",
                  tuple4.Item1, tuple4.Item4, tuple4.Item2,
                  tuple4.Item3);
// Displays New York: Hi 76.3, Lo 32.68, Ave 51.87
Dim tuple4 = Tuple.Create("New York", 32.68, 51.87, 76.3)
Console.WriteLine("{0}: Hi {1}, Lo {2}, Ave {3}",
                  tuple4.Item1, tuple4.Item4, tuple4.Item2,
                  tuple4.Item3)
' Displays New York: Hi 76.3, Lo 32.68, Ave 51.87

Este código es equivalente a la siguiente llamada al Tuple<T1,T2,T3,T4>.Tuple<T1,T2,T3,T4> constructor de clase.This code is equivalent to the following call to the Tuple<T1,T2,T3,T4>.Tuple<T1,T2,T3,T4> class constructor.

var tuple4 = new Tuple<string, double, double, double>
                      ("New York", 32.68, 51.87, 76.3);
Console.WriteLine("{0}: Hi {1}, Lo {2}, Ave {3}",
                  tuple4.Item1, tuple4.Item4, tuple4.Item2,
                  tuple4.Item3);
// Displays New York: Hi 76.3, Lo 32.68, Ave 51.87
Dim tuple4 = New Tuple(Of String, Double, Double, Double) _
                      ("New York", 32.68, 51.87, 76.3)
Console.WriteLine("{0}: Hi {1}, Lo {2}, Ave {3}",
                  tuple4.Item1, tuple4.Item4, tuple4.Item2,
                  tuple4.Item3)
' Displays New York: Hi 76.3, Lo 32.68, Ave 51.87
Consulte también:

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

Crea una nueva tupla de 3 o triple.Creates a new 3-tuple, or triple.

public:
generic <typename T1, typename T2, typename T3>
 static Tuple<T1, T2, T3> ^ Create(T1 item1, T2 item2, T3 item3);
public static Tuple<T1,T2,T3> Create<T1,T2,T3> (T1 item1, T2 item2, T3 item3);
static member Create : 'T1 * 'T2 * 'T3 -> 'T1 * 'T2 * 'T3
Public Shared Function Create(Of T1, T2, T3) (item1 As T1, item2 As T2, item3 As T3) As Tuple(Of T1, T2, T3)

Parámetros de tipo

T1

Tipo del primer componente de la tupla.The type of the first component of the tuple.

T2

Tipo del segundo componente de la tupla.The type of the second component of the tuple.

T3

Tipo del tercer componente de la tupla.The type of the third component of the tuple.

Parámetros

item1
T1 T1 T1 T1

Valor del primer componente de la tupla.The value of the first component of the tuple.

item2
T2 T2 T2 T2

Valor del segundo componente de la tupla.The value of the second component of the tuple.

item3
T3 T3 T3 T3

Valor del tercer componente de la tupla.The value of the third component of the tuple.

Devoluciones

Una tupla de 3 cuyo valor es (item1, item2, item3).A 3-tuple whose value is (item1, item2, item3).

Comentarios

Createes un método auxiliar al que se puede llamar para crear instancias de un objeto de 3 tuplas sin tener que especificar explícitamente los tipos de sus componentes.Create is a helper method that you can call to instantiate a 3-tuple object without having to explicitly specify the types of its components. En el ejemplo siguiente se Create usa el método para crear una instancia de una tupla de 3.The following example uses the Create method to instantiate a 3-tuple.

var tuple3 = Tuple.Create("New York", 32.68, 51.87);
Console.WriteLine("{0}: lo {1}, hi {2}", 
                  tuple3.Item1, tuple3.Item2, tuple3.Item3);
// Displays New York: lo 32.68, hi 51.87
Dim tuple3 = Tuple.Create("New York", 32.68, 51.87)
Console.WriteLine("{0}: lo {1}, hi {2}", 
                  tuple3.Item1, tuple3.Item2, tuple3.Item3)
' Displays New York: lo 32.68, hi 51.87

Este código es equivalente a la siguiente llamada al Tuple<T1,T2,T3>.Tuple<T1,T2,T3> constructor de clase.This code is equivalent to the following call to the Tuple<T1,T2,T3>.Tuple<T1,T2,T3> class constructor.

var tuple3 = new Tuple<string, double, double>
                      ("New York", 32.68, 51.87);
Console.WriteLine("{0}: lo {1}, hi {2}", 
                  tuple3.Item1, tuple3.Item2, tuple3.Item3);
// Displays New York: lo 32.68, hi 51.87
Dim tuple3 = New Tuple(Of String, Double, Double)("New York", 32.68, 51.87)
Console.WriteLine("{0}: lo {1}, hi {2}", 
                  tuple3.Item1, tuple3.Item2, tuple3.Item3)
' Displays New York: lo 32.68, hi 51.87
Consulte también:

Create<T1,T2>(T1, T2) Create<T1,T2>(T1, T2) Create<T1,T2>(T1, T2) Create<T1,T2>(T1, T2)

Crea una nueva tupla de 2 o par.Creates a new 2-tuple, or pair.

public:
generic <typename T1, typename T2>
 static Tuple<T1, T2> ^ Create(T1 item1, T2 item2);
public static Tuple<T1,T2> Create<T1,T2> (T1 item1, T2 item2);
static member Create : 'T1 * 'T2 -> 'T1 * 'T2
Public Shared Function Create(Of T1, T2) (item1 As T1, item2 As T2) As Tuple(Of T1, T2)

Parámetros de tipo

T1

Tipo del primer componente de la tupla.The type of the first component of the tuple.

T2

Tipo del segundo componente de la tupla.The type of the second component of the tuple.

Parámetros

item1
T1 T1 T1 T1

Valor del primer componente de la tupla.The value of the first component of the tuple.

item2
T2 T2 T2 T2

Valor del segundo componente de la tupla.The value of the second component of the tuple.

Devoluciones

Una tupla de 2 cuyo valor es (item1, item2).A 2-tuple whose value is (item1, item2).

Comentarios

Createes un método auxiliar al que se puede llamar para crear instancias de un objeto de tupla 2 sin tener que especificar explícitamente los tipos de sus componentes.Create is a helper method that you can call to instantiate a 2-tuple object without having to explicitly specify the types of its components. En el ejemplo siguiente se Create usa el método para crear una instancia de una tupla de 2.The following example uses the Create method to instantiate a 2-tuple.

var tuple2 = Tuple.Create("New York", 32.68);
Console.WriteLine("{0}: {1}", tuple2.Item1, tuple2.Item2);
// Displays New York: 32.68
Dim tuple2 = Tuple.Create("New York", 32.68)
Console.WriteLine("{0}: {1}", tuple2.Item1, tuple2.Item2)
' Displays New York: 32.68

Este código es equivalente a la siguiente llamada al Tuple<T1,T2> constructor de clase.This code is equivalent to the following call to the Tuple<T1,T2> class constructor.

var tuple2 = new Tuple<string, double>("New York", 32.68);
Console.WriteLine("{0}: {1}", tuple2.Item1, tuple2.Item2);
// Displays New York: 32.68
Dim tuple2 = New Tuple(Of String, Double)("New York", 32.68)
Console.WriteLine("{0}: {1}", tuple2.Item1, tuple2.Item2)
' Displays New York: 32.68
Consulte también:

Create<T1>(T1) Create<T1>(T1) Create<T1>(T1) Create<T1>(T1)

Crea una nueva tupla de 1 o singleton.Creates a new 1-tuple, or singleton.

public:
generic <typename T1>
 static Tuple<T1> ^ Create(T1 item1);
public static Tuple<T1> Create<T1> (T1 item1);
static member Create : 'T1 -> 'T1
Public Shared Function Create(Of T1) (item1 As T1) As Tuple(Of T1)

Parámetros de tipo

T1

Tipo del único componente de la tupla.The type of the only component of the tuple.

Parámetros

item1
T1 T1 T1 T1

Valor del único componente de la tupla.The value of the only component of the tuple.

Devoluciones

Una tupla cuyo valor es (item1).A tuple whose value is (item1).

Comentarios

Createes un método auxiliar al que se puede llamar para crear instancias de un objeto de tupla 1 sin tener que especificar explícitamente el tipo de su componente.Create is a helper method that you can call to instantiate a 1-tuple object without having to explicitly specify the type of its component. En el ejemplo siguiente se Create usa el método para crear una instancia de una tupla de 1 cuyo Int32componente es de tipo.The following example uses the Create method to instantiate a 1-tuple whose component is of type Int32.

var tuple1 = Tuple.Create(12);
Console.WriteLine(tuple1.Item1);     // Displays 12
Dim tuple1 = Tuple.Create(12)
Console.WriteLine(tuple1.Item1)     ' Displays 12

Este código es equivalente a la siguiente llamada al Tuple<T1> constructor de clase.This code is equivalent to the following call to the Tuple<T1> class constructor.

var tuple1 = new Tuple<int>(12);
Console.WriteLine(tuple1.Item1);     // Displays 12
Dim tuple1 = New Tuple(Of Integer)(12)
Console.WriteLine(tuple1.Item1)     ' Displays 12
Consulte también:

Se aplica a