語言

TupleElementNamesAttribute 建構函式

定義

多載

名稱 Description
TupleElementNamesAttribute()

>初始化該 TupleElementNamesAttribute 類別的新實例。

TupleElementNamesAttribute(String[])

初始化 TupleElementNamesAttribute 類別的新執行個體。

TupleElementNamesAttribute()

>初始化該 TupleElementNamesAttribute 類別的新實例。

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

適用於

TupleElementNamesAttribute(String[])

來源:
TupleElementNamesAttribute.cs
來源:
TupleElementNamesAttribute.cs
來源:
TupleElementNamesAttribute.cs
來源:
TupleElementNamesAttribute.cs
來源:
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}

適用於