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

值元组的第 1 个组件的类型。The type of the value tuple's first component.

T2

值元组的第 2 个组件的类型。The type of the value tuple's second component.

T3

值元组的第 3 个组件的类型。The type of the value tuple's third component.

T4

值元组的第 4 个组件的类型。The type of the value tuple's fourth component.

T5

值元组的第 5 个组件的类型。The type of the value tuple's fifth component.

T6

值元组的第 6 个组件的类型。The type of the value tuple's sixth component.

T7

值元组的第 7 个组件的类型。The type of the value tuple's seventh component.

T8

值元组的第 8 个组件的类型。The type of the value tuple's eighth component.

参数

item1
T1 T1 T1 T1

值元组的第 1 个组件的值。The value of the value tuple's first component.

item2
T2 T2 T2 T2

值元组的第 2 个组件的值。The value of the value tuple's second component.

item3
T3 T3 T3 T3

值元组的第 3 个组件的值。The value of the value tuple's third component.

item4
T4 T4 T4 T4

值元组的第 4 个组件的值。The value of the value tuple's fourth component.

item5
T5 T5 T5 T5

值元组的第 5 个组件的值。The value of the value tuple's fifth component.

item6
T6 T6 T6 T6

值元组的第 6 个组件的值。The value of the value tuple's sixth component.

item7
T7 T7 T7 T7

值元组的第 7 个组件的值。The value of the value tuple's seventh component.

item8
T8 T8 T8 T8

值元组的第 8 个组件的值。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. 静态方法ValueTuple结构不能用于创建具有九个或多个组件的元组。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

值元组的第 1 个组件的类型。The type of the value tuple's first component.

T2

值元组的第 2 个组件的类型。The type of the value tuple's second component.

T3

值元组的第 3 个组件的类型。The type of the value tuple's third component.

T4

值元组的第 4 个组件的类型。The type of the value tuple's fourth component.

T5

值元组的第 5 个组件的类型。The type of the value tuple's fifth component.

T6

值元组的第 6 个组件的类型。The type of the value tuple's sixth component.

T7

值元组的第 7 个组件的类型。The type of the value tuple's seventh component.

参数

item1
T1 T1 T1 T1

值元组的第 1 个组件的值。The value of the value tuple's first component.

item2
T2 T2 T2 T2

值元组的第 2 个组件的值。The value of the value tuple's second component.

item3
T3 T3 T3 T3

值元组的第 3 个组件的值。The value of the value tuple's third component.

item4
T4 T4 T4 T4

值元组的第 4 个组件的值。The value of the value tuple's fourth component.

item5
T5 T5 T5 T5

值元组的第 5 个组件的值。The value of the value tuple's fifth component.

item6
T6 T6 T6 T6

值元组的第 6 个组件的值。The value of the value tuple's sixth component.

item7
T7 T7 T7 T7

值元组的第 7 个组件的值。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

值元组的第 1 个组件的类型。The type of the value tuple's first component.

T2

值元组的第 2 个组件的类型。The type of the value tuple's second component.

T3

值元组的第 3 个组件的类型。The type of the value tuple's third component.

T4

值元组的第 4 个组件的类型。The type of the value tuple's fourth component.

T5

值元组的第 5 个组件的类型。The type of the value tuple's fifth component.

T6

值元组的第 6 个组件的类型。The type of the value tuple's sixth component.

参数

item1
T1 T1 T1 T1

值元组的第 1 个组件的值。The value of the value tuple's first component.

item2
T2 T2 T2 T2

值元组的第 2 个组件的值。The value of the value tuple's second component.

item3
T3 T3 T3 T3

值元组的第 3 个组件的值。The value of the value tuple's third component.

item4
T4 T4 T4 T4

值元组的第 4 个组件的值。The value of the value tuple's fourth component.

item5
T5 T5 T5 T5

值元组的第 5 个组件的值。The value of the value tuple's fifth component.

item6
T6 T6 T6 T6

值元组的第 6 个组件的值。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

值元组的第 1 个组件的类型。The type of the value tuple's first component.

T2

值元组的第 2 个组件的类型。The type of the value tuple's second component.

T3

值元组的第 3 个组件的类型。The type of the value tuple's third component.

T4

值元组的第 4 个组件的类型。The type of the value tuple's fourth component.

T5

值元组的第 5 个组件的类型。The type of the value tuple's fifth component.

参数

item1
T1 T1 T1 T1

值元组的第 1 个组件的值。The value of the value tuple's first component.

item2
T2 T2 T2 T2

值元组的第 2 个组件的值。The value of the value tuple's second component.

item3
T3 T3 T3 T3

值元组的第 3 个组件的值。The value of the value tuple's third component.

item4
T4 T4 T4 T4

值元组的第 4 个组件的值。The value of the value tuple's fourth component.

item5
T5 T5 T5 T5

值元组的第 5 个组件的值。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

值元组的第 1 个组件的类型。The type of the value tuple's first component.

T2

值元组的第 2 个组件的类型。The type of the value tuple's second component.

T3

值元组的第 3 个组件的类型。The type of the value tuple's third component.

T4

值元组的第 4 个组件的类型。The type of the value tuple's fourth component.

参数

item1
T1 T1 T1 T1

值元组的第 1 个组件的值。The value of the value tuple's first component.

item2
T2 T2 T2 T2

值元组的第 2 个组件的值。The value of the value tuple's second component.

item3
T3 T3 T3 T3

值元组的第 3 个组件的值。The value of the value tuple's third component.

item4
T4 T4 T4 T4

值元组的第 4 个组件的值。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

值元组的第 1 个组件的类型。The type of the value tuple's first component.

T2

值元组的第 2 个组件的类型。The type of the value tuple's second component.

T3

值元组的第 3 个组件的类型。The type of the value tuple's third component.

参数

item1
T1 T1 T1 T1

值元组的第 1 个组件的值。The value of the value tuple's first component.

item2
T2 T2 T2 T2

值元组的第 2 个组件的值。The value of the value tuple's second component.

item3
T3 T3 T3 T3

值元组的第 3 个组件的值。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

值元组的第 1 个组件的类型。The type of the value tuple's first component.

T2

值元组的第 2 个组件的类型。The type of the value tuple's second component.

参数

item1
T1 T1 T1 T1

值元组的第 1 个组件的值。The value of the value tuple's first component.

item2
T2 T2 T2 T2

值元组的第 2 个组件的值。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.

适用于