ValueTuple.Create ValueTuple.Create ValueTuple.Create ValueTuple.Create Method

定義

建立新的值元組執行個體。Creates a new value tuple instance.

多載

Create() Create() Create() 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) 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)

建立含有 8 個元件的新值元組 (八重物件)。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) 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)

建立含有 7 個元件的新值元組 (七重物件)。Creates a new value tuple with 7 components (a 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)

建立含有 6 個元件的新值元組 (六重物件)。Creates a new value tuple with 6 components (a sexuple).

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)

建立含有 5 個元件的新值元組 (五重物件)。Creates a new value tuple with 5 components (a 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)

建立含有 4 個元件的新值元組 (四重物件)。Creates a new value tuple with 4 components (a 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)

建立含有 3 個元件的新值元組 (三重物件)。Creates a new value tuple with 3 components (a triple).

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

建立含有 2 個元件的新值元組 (一對)。Creates a new value tuple with 2 components (a pair).

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

建立含有 1 個元件的新值元組 (單一物件)。Creates a new value tuple with 1 component (a singleton).

Create() Create() Create() Create()

建立不含元件的新值元組。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

傳回

不含元件的新值元組。A new value tuple with no components.

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)

建立含有 8 個元件的新值元組 (八重物件)。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 ValueTuple<T1,T2,T3,T4,T5,T6,T7,ValueTuple<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))

類型參數

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.

參數

item1
T1 T1 T1 T1

值元組第一個元件的值。The value of the value tuple's first component.

item2
T2 T2 T2 T2

值元組第二個元件的值。The value of the value tuple's second component.

item3
T3 T3 T3 T3

值元組第三個元件的值。The value of the value tuple's third component.

item4
T4 T4 T4 T4

值元組第四個元件的值。The value of the value tuple's fourth component.

item5
T5 T5 T5 T5

值元組第五個元件的值。The value of the value tuple's fifth component.

item6
T6 T6 T6 T6

值元組第六個元件的值。The value of the value tuple's sixth component.

item7
T7 T7 T7 T7

值元組第七個元件的值。The value of the value tuple's seventh component.

item8
T8 T8 T8 T8

值元組第八個元件的值。The value of the value tuple's eighth component.

傳回

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

含有 8 個元件的值元組。A value tuple with 8 components.

備註

Create 是協助程式方法,您可以呼叫它來具現化8個元件的值元組,而不需要明確指定其元件的類型。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.

注意

您必須呼叫 ValueTuple<T1,T2,T3,T4,T5,T6,T7,TRest> 的函式,以建立具有九個以上元件的元組,除非您的語言提供此用途的特殊語法。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. @No__t-0 結構的靜態方法不能用來建立包含九個或多個元件的元組。The static methods of the ValueTuple structure cannot be used to create a tuple with nine or more components.

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)

建立含有 7 個元件的新值元組 (七重物件)。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 ValueTuple<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)

類型參數

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.

參數

item1
T1 T1 T1 T1

值元組第一個元件的值。The value of the value tuple's first component.

item2
T2 T2 T2 T2

值元組第二個元件的值。The value of the value tuple's second component.

item3
T3 T3 T3 T3

值元組第三個元件的值。The value of the value tuple's third component.

item4
T4 T4 T4 T4

值元組第四個元件的值。The value of the value tuple's fourth component.

item5
T5 T5 T5 T5

值元組第五個元件的值。The value of the value tuple's fifth component.

item6
T6 T6 T6 T6

值元組第六個元件的值。The value of the value tuple's sixth component.

item7
T7 T7 T7 T7

值元組第七個元件的值。The value of the value tuple's seventh component.

傳回

備註

Create 是協助程式方法,您可以呼叫它來具現化7個元件值元組,而不需要明確指定其元件的類型。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.

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)

建立含有 6 個元件的新值元組 (六重物件)。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 ValueTuple<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)

類型參數

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.

參數

item1
T1 T1 T1 T1

值元組第一個元件的值。The value of the value tuple's first component.

item2
T2 T2 T2 T2

值元組第二個元件的值。The value of the value tuple's second component.

item3
T3 T3 T3 T3

值元組第三個元件的值。The value of the value tuple's third component.

item4
T4 T4 T4 T4

值元組第四個元件的值。The value of the value tuple's fourth component.

item5
T5 T5 T5 T5

值元組第五個元件的值。The value of the value tuple's fifth component.

item6
T6 T6 T6 T6

值元組第六個元件的值。The value of the value tuple's sixth component.

傳回

備註

Create 是協助程式方法,您可以呼叫它來具現化6個元件的值元組,而不需要明確指定其元件的類型。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.

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)

建立含有 5 個元件的新值元組 (五重物件)。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 ValueTuple<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)

類型參數

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.

參數

item1
T1 T1 T1 T1

值元組第一個元件的值。The value of the value tuple's first component.

item2
T2 T2 T2 T2

值元組第二個元件的值。The value of the value tuple's second component.

item3
T3 T3 T3 T3

值元組第三個元件的值。The value of the value tuple's third component.

item4
T4 T4 T4 T4

值元組第四個元件的值。The value of the value tuple's fourth component.

item5
T5 T5 T5 T5

值元組第五個元件的值。The value of the value tuple's fifth component.

傳回

含有 5 個元件的值元組。A value tuple with 5 components.

備註

Create 是協助程式方法,您可以呼叫它來具現化5個元件的值元組,而不需要明確指定其元件的類型。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.

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)

建立含有 4 個元件的新值元組 (四重物件)。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 ValueTuple<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)

類型參數

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.

參數

item1
T1 T1 T1 T1

值元組第一個元件的值。The value of the value tuple's first component.

item2
T2 T2 T2 T2

值元組第二個元件的值。The value of the value tuple's second component.

item3
T3 T3 T3 T3

值元組第三個元件的值。The value of the value tuple's third component.

item4
T4 T4 T4 T4

值元組第四個元件的值。The value of the value tuple's fourth component.

傳回

含有 4 個元件的值元組。A value tuple with 4 components.

備註

Create 是協助程式方法,您可以呼叫它來具現化4個元件的值元組,而不需要明確指定其元件的類型。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.

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)

建立含有 3 個元件的新值元組 (三重物件)。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 ValueTuple<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)

類型參數

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.

參數

item1
T1 T1 T1 T1

值元組第一個元件的值。The value of the value tuple's first component.

item2
T2 T2 T2 T2

值元組第二個元件的值。The value of the value tuple's second component.

item3
T3 T3 T3 T3

值元組第三個元件的值。The value of the value tuple's third component.

傳回

含有 3 個元件的值元組。A value tuple with 3 components.

備註

Create 是協助程式方法,您可以呼叫它來具現化3個元件的值元組,而不需要明確指定其元件的類型。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.

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

建立含有 2 個元件的新值元組 (一對)。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 ValueTuple<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)

類型參數

T1

值元組第一個元件的類型。The type of the value tuple's first component.

T2

值元組第二個元件的類型。The type of the value tuple's second component.

參數

item1
T1 T1 T1 T1

值元組第一個元件的值。The value of the value tuple's first component.

item2
T2 T2 T2 T2

值元組第二個元件的值。The value of the value tuple's second component.

傳回

含有 2 個元件的值元組。A value tuple with 2 components.

備註

Create 是協助程式方法,您可以呼叫它來具現化2個元件的值元組,而不需要明確指定其元件的類型。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.

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

建立含有 1 個元件的新值元組 (單一物件)。Creates a new value tuple with 1 component (a singleton).

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

類型參數

T1

值元組唯一元件的類型。The type of the value tuple's only component.

參數

item1
T1 T1 T1 T1

值元組唯一元件的值。The value of the value tuple's only component.

傳回

含有 1 個元件的值元組。A value tuple with 1 component.

備註

Create 是協助程式方法,您可以呼叫它來具現化1個元件的值元組,而不需要明確指定其元件的類型。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.

適用於