ValueTuple<T1,T2,T3,T4,T5,T6,T7,TRest>(T1, T2, T3, T4, T5, T6, T7, TRest) ValueTuple<T1,T2,T3,T4,T5,T6,T7,TRest>(T1, T2, T3, T4, T5, T6, T7, TRest) ValueTuple<T1,T2,T3,T4,T5,T6,T7,TRest>(T1, T2, T3, T4, T5, T6, T7, TRest) ValueTuple<T1,T2,T3,T4,T5,T6,T7,TRest>(T1, T2, T3, T4, T5, T6, T7, TRest) Constructor

定义

初始化一个新 ValueTuple<T1,T2,T3,T4,T5,T6,T7,TRest> 实例。Initializes a new ValueTuple<T1,T2,T3,T4,T5,T6,T7,TRest> instance.

public:
 ValueTuple(T1 item1, T2 item2, T3 item3, T4 item4, T5 item5, T6 item6, T7 item7, TRest rest);
public ValueTuple (T1 item1, T2 item2, T3 item3, T4 item4, T5 item5, T6 item6, T7 item7, TRest rest);
new ValueTuple<'T1, 'T2, 'T3, 'T4, 'T5, 'T6, 'T7, 'Rest (requires 'Rest : struct)> : 'T1 * 'T2 * 'T3 * 'T4 * 'T5 * 'T6 * 'T7 * 'Rest -> ValueTuple<'T1, 'T2, 'T3, 'T4, 'T5, 'T6, 'T7, 'Rest (requires 'Rest : struct)>
Public Sub New (item1 As T1, item2 As T2, item3 As T3, item4 As T4, item5 As T5, item6 As T6, item7 As T7, rest As TRest)

参数

item1
T1 T1 T1 T1

值元组的第 1 个元素。The value tuple's first element.

item2
T2 T2 T2 T2

值元组的第 2 个元素。The value tuple's second element.

item3
T3 T3 T3 T3

值元组的第 3 个元素。The value tuple's third element.

item4
T4 T4 T4 T4

值元组的第 4 个元素。The value tuple's fourth element.

item5
T5 T5 T5 T5

值元组的第 5 个元素。The value tuple's fifth element.

item6
T6 T6 T6 T6

值元组的第 6 个元素。The value tuple's sixth element.

item7
T7 T7 T7 T7

值元组的第 7 个元素。The value tuple's seventh element.

rest
TRest TRest TRest TRest

值元组类型的实例,其包含值元组的剩下元素的值。An instance of any value tuple type that contains the values of the value's tuple's remaining elements.

异常

rest 不是泛型值元组类型。rest is not a generic value tuple type.

注解

除了使用元组所用语言的内置支持,您还可以创建值元组通过调用静态ValueTuple.Create<T1,T2,T3,T4,T5,T6,T7,T8>(T1, T2, T3, T4, T5, T6, T7, T8)方法,而无需显式指定其元素的类型。In addition to using your language's build-in support for tuples, you can also create a value tuple by calling the static ValueTuple.Create<T1,T2,T3,T4,T5,T6,T7,T8>(T1, T2, T3, T4, T5, T6, T7, T8) method without having to explicitly specify the types of its elements.

适用于

另请参阅