TupleElementNamesAttribute Constructor (String[])

 

Initializes a new instance of the TupleElementNamesAttribute class.

Namespace:   System.Runtime.CompilerServices
Assembly:  mscorlib (in mscorlib.dll)

public TupleElementNamesAttribute(
	string[] transformNames
)

Parameters

transformNames
Type: System.String[]

A string array that specifies, in a pre-order depth-first traversal of a type's construction, which value tuple occurrences are meant to carry element names.

This constructor is used on types that contain a value tuple instance with element names. For example, if C is a generic type with two type parameters, then the use of the constructed type C(ValueTuple<T1, T2>, ValueTuple<T1, T2, T3>) might be intended to treat the first type argument as a tuple with element names and the second as a tuple without element names. In this case, the appropriate attribute specification should use a transformNames value of { "name1", "name2", null, null, null}.

.NET Framework
Available since 4.7
Return to top
Show: