Редагувати

Поділитися через


CollectionBuilderAttribute(Type, String) Constructor

Definition

Initializes a new instance of CollectionBuilderAttribute that refers to the methodName method on the builderType type.

public:
 CollectionBuilderAttribute(Type ^ builderType, System::String ^ methodName);
public CollectionBuilderAttribute (Type builderType, string methodName);
new System.Runtime.CompilerServices.CollectionBuilderAttribute : Type * string -> System.Runtime.CompilerServices.CollectionBuilderAttribute
Public Sub New (builderType As Type, methodName As String)

Parameters

builderType
Type

The type of the builder to use to construct the collection.

methodName
String

The name of the method on the builder to use to construct the collection.

Remarks

methodName must refer to a static method that accepts a single parameter of type ReadOnlySpan<T> and returns an instance of the collection being built containing a copy of the data from that span. In future releases of .NET, additional patterns may be supported.

Applies to