Επεξεργασία

Κοινή χρήση μέσω


ValueTuple.Create Method

Definition

Creates a new value tuple instance.

Overloads

Create()

Creates a new value tuple with zero components.

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

Creates a new value tuple with 8 components (an octuple).

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

Creates a new value tuple with 7 components (a septuple).

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

Creates a new value tuple with 6 components (a sexuple).

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

Creates a new value tuple with 5 components (a quintuple).

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

Creates a new value tuple with 4 components (a quadruple).

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

Creates a new value tuple with 3 components (a triple).

Create<T1,T2>(T1, T2)

Creates a new value tuple with 2 components (a pair).

Create<T1>(T1)

Creates a new value tuple with 1 component (a singleton).

Create()

Source:
ValueTuple.cs
Source:
ValueTuple.cs
Source:
ValueTuple.cs

Creates a new value tuple with zero components.

public:
 static ValueTuple Create();
public static ValueTuple Create ();
static member Create : unit -> ValueTuple
Public Shared Function Create () As ValueTuple

Returns

A new value tuple with no components.

Applies to

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

Source:
ValueTuple.cs
Source:
ValueTuple.cs
Source:
ValueTuple.cs

Creates a new value tuple with 8 components (an octuple).

public:
generic <typename T1, typename T2, typename T3, typename T4, typename T5, typename T6, typename T7, typename T8>
 static ValueTuple<T1, T2, T3, T4, T5, T6, T7, ValueTuple<T8>> Create(T1 item1, T2 item2, T3 item3, T4 item4, T5 item5, T6 item6, T7 item7, T8 item8);
public static (T1, T2, T3, T4, T5, T6, T7, (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 -> ValueTuple<'T1, 'T2, 'T3, 'T4, 'T5, 'T6, 'T7, ValueTuple<'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 ValueTuple(Of T1, T2, T3, T4, T5, T6, T7, ValueTuple(Of T8))

Type Parameters

T1

The type of the value tuple's first component.

T2

The type of the value tuple's second component.

T3

The type of the value tuple's third component.

T4

The type of the value tuple's fourth component.

T5

The type of the value tuple's fifth component.

T6

The type of the value tuple's sixth component.

T7

The type of the value tuple's seventh component.

T8

The type of the value tuple's eighth component.

Parameters

item1
T1

The value of the value tuple's first component.

item2
T2

The value of the value tuple's second component.

item3
T3

The value of the value tuple's third component.

item4
T4

The value of the value tuple's fourth component.

item5
T5

The value of the value tuple's fifth component.

item6
T6

The value of the value tuple's sixth component.

item7
T7

The value of the value tuple's seventh component.

item8
T8

The value of the value tuple's eighth component.

Returns

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

A value tuple with 8 components.

Remarks

Create is a helper method that you can call to instantiate an 8-component value tuple without having to explicitly specify the types of its components.

Note

You must call the ValueTuple<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. The static methods of the ValueTuple structure cannot be used to create a tuple with nine or more components.

Applies to

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

Source:
ValueTuple.cs
Source:
ValueTuple.cs
Source:
ValueTuple.cs

Creates a new value tuple with 7 components (a septuple).

public:
generic <typename T1, typename T2, typename T3, typename T4, typename T5, typename T6, typename T7>
 static ValueTuple<T1, T2, T3, T4, T5, T6, T7> Create(T1 item1, T2 item2, T3 item3, T4 item4, T5 item5, T6 item6, T7 item7);
public static (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 -> ValueTuple<'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 ValueTuple(Of T1, T2, T3, T4, T5, T6, T7)

Type Parameters

T1

The type of the value tuple's first component.

T2

The type of the value tuple's second component.

T3

The type of the value tuple's third component.

T4

The type of the value tuple's fourth component.

T5

The type of the value tuple's fifth component.

T6

The type of the value tuple's sixth component.

T7

The type of the value tuple's seventh component.

Parameters

item1
T1

The value of the value tuple's first component.

item2
T2

The value of the value tuple's second component.

item3
T3

The value of the value tuple's third component.

item4
T4

The value of the value tuple's fourth component.

item5
T5

The value of the value tuple's fifth component.

item6
T6

The value of the value tuple's sixth component.

item7
T7

The value of the value tuple's seventh component.

Returns

A value tuple with 7 components.

Remarks

Create is a helper method that you can call to instantiate an 7-component value tuple without having to explicitly specify the types of its components.

Applies to

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

Source:
ValueTuple.cs
Source:
ValueTuple.cs
Source:
ValueTuple.cs

Creates a new value tuple with 6 components (a sexuple).

public:
generic <typename T1, typename T2, typename T3, typename T4, typename T5, typename T6>
 static ValueTuple<T1, T2, T3, T4, T5, T6> Create(T1 item1, T2 item2, T3 item3, T4 item4, T5 item5, T6 item6);
public static (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 -> ValueTuple<'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 ValueTuple(Of T1, T2, T3, T4, T5, T6)

Type Parameters

T1

The type of the value tuple's first component.

T2

The type of the value tuple's second component.

T3

The type of the value tuple's third component.

T4

The type of the value tuple's fourth component.

T5

The type of the value tuple's fifth component.

T6

The type of the value tuple's sixth component.

Parameters

item1
T1

The value of the value tuple's first component.

item2
T2

The value of the value tuple's second component.

item3
T3

The value of the value tuple's third component.

item4
T4

The value of the value tuple's fourth component.

item5
T5

The value of the value tuple's fifth component.

item6
T6

The value of the value tuple's sixth component.

Returns

A value tuple with 6 components.

Remarks

Create is a helper method that you can call to instantiate a 6-component value tuple without having to explicitly specify the types of its components.

Applies to

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

Source:
ValueTuple.cs
Source:
ValueTuple.cs
Source:
ValueTuple.cs

Creates a new value tuple with 5 components (a quintuple).

public:
generic <typename T1, typename T2, typename T3, typename T4, typename T5>
 static ValueTuple<T1, T2, T3, T4, T5> Create(T1 item1, T2 item2, T3 item3, T4 item4, T5 item5);
public static (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 -> ValueTuple<'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 ValueTuple(Of T1, T2, T3, T4, T5)

Type Parameters

T1

The type of the value tuple's first component.

T2

The type of the value tuple's second component.

T3

The type of the value tuple's third component.

T4

The type of the value tuple's fourth component.

T5

The type of the value tuple's fifth component.

Parameters

item1
T1

The value of the value tuple's first component.

item2
T2

The value of the value tuple's second component.

item3
T3

The value of the value tuple's third component.

item4
T4

The value of the value tuple's fourth component.

item5
T5

The value of the value tuple's fifth component.

Returns

A value tuple with 5 components.

Remarks

Create is a helper method that you can call to instantiate a 5-component value tuple without having to explicitly specify the types of its components.

Applies to

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

Source:
ValueTuple.cs
Source:
ValueTuple.cs
Source:
ValueTuple.cs

Creates a new value tuple with 4 components (a quadruple).

public:
generic <typename T1, typename T2, typename T3, typename T4>
 static ValueTuple<T1, T2, T3, T4> Create(T1 item1, T2 item2, T3 item3, T4 item4);
public static (T1, T2, T3, T4) Create<T1,T2,T3,T4> (T1 item1, T2 item2, T3 item3, T4 item4);
static member Create : 'T1 * 'T2 * 'T3 * 'T4 -> ValueTuple<'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 ValueTuple(Of T1, T2, T3, T4)

Type Parameters

T1

The type of the value tuple's first component.

T2

The type of the value tuple's second component.

T3

The type of the value tuple's third component.

T4

The type of the value tuple's fourth component.

Parameters

item1
T1

The value of the value tuple's first component.

item2
T2

The value of the value tuple's second component.

item3
T3

The value of the value tuple's third component.

item4
T4

The value of the value tuple's fourth component.

Returns

A value tuple with 4 components.

Remarks

Create is a helper method that you can call to instantiate an 4-component value tuple without having to explicitly specify the types of its components.

Applies to

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

Source:
ValueTuple.cs
Source:
ValueTuple.cs
Source:
ValueTuple.cs

Creates a new value tuple with 3 components (a triple).

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

Type Parameters

T1

The type of the value tuple's first component.

T2

The type of the value tuple's second component.

T3

The type of the value tuple's third component.

Parameters

item1
T1

The value of the value tuple's first component.

item2
T2

The value of the value tuple's second component.

item3
T3

The value of the value tuple's third component.

Returns

A value tuple with 3 components.

Remarks

Create is a helper method that you can call to instantiate an 3-component value tuple without having to explicitly specify the types of its components.

Applies to

Create<T1,T2>(T1, T2)

Source:
ValueTuple.cs
Source:
ValueTuple.cs
Source:
ValueTuple.cs

Creates a new value tuple with 2 components (a pair).

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

Type Parameters

T1

The type of the value tuple's first component.

T2

The type of the value tuple's second component.

Parameters

item1
T1

The value of the value tuple's first component.

item2
T2

The value of the value tuple's second component.

Returns

A value tuple with 2 components.

Remarks

Create is a helper method that you can call to instantiate an 2-component value tuple without having to explicitly specify the types of its components.

Applies to

Create<T1>(T1)

Source:
ValueTuple.cs
Source:
ValueTuple.cs
Source:
ValueTuple.cs

Creates a new value tuple with 1 component (a singleton).

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

Type Parameters

T1

The type of the value tuple's only component.

Parameters

item1
T1

The value of the value tuple's only component.

Returns

A value tuple with 1 component.

Remarks

Create is a helper method that you can call to instantiate a 1-component value tuple without having to explicitly specify the type of its component.

Applies to