TupleElementNamesAttribute 构造函数

定义

重载

TupleElementNamesAttribute()

>初始化 TupleElementNamesAttribute 类的新实例。

TupleElementNamesAttribute(String[])

初始化 TupleElementNamesAttribute 类的新实例。

TupleElementNamesAttribute()

>初始化 TupleElementNamesAttribute 类的新实例。

public:
 TupleElementNamesAttribute();
public TupleElementNamesAttribute ();
Public Sub New ()

适用于

TupleElementNamesAttribute(String[])

Source:
TupleElementNamesAttribute.cs
Source:
TupleElementNamesAttribute.cs
Source:
TupleElementNamesAttribute.cs

初始化 TupleElementNamesAttribute 类的新实例。

public:
 TupleElementNamesAttribute(cli::array <System::String ^> ^ transformNames);
public TupleElementNamesAttribute (string?[] transformNames);
public TupleElementNamesAttribute (string[] transformNames);
new System.Runtime.CompilerServices.TupleElementNamesAttribute : string[] -> System.Runtime.CompilerServices.TupleElementNamesAttribute
Public Sub New (transformNames As String())

参数

transformNames
String[]

一个字符串数组,该数组指示在类型构造的深度优先前序遍历中,哪个值元组事件应具有元素名称。

注解

此构造函数用于包含具有元素名称的值元组实例的类型。 例如,如果 C 是具有两个类型参数的泛型类型,则使用构造的类型)C(ValueTuple<T1,T2>,ValueTuple<T1,T2,T3>可能旨在将第一个类型参数视为具有元素名称的元组,将第二个类型参数视为不带元素名称的元组。 在这种情况下,相应的属性规范应使用 transformNames{ "name1", "name2", null, null, null}

适用于