Share via


CollectionBuilderAttribute(Type, String) コンストラクター

定義

型の メソッドを参照する のCollectionBuilderAttributemethodName新しいインスタンスをbuilderType初期化します。

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)

パラメーター

builderType
Type

コレクションの構築に使用するビルダーの型。

methodName
String

コレクションの構築に使用するビルダーのメソッドの名前。

注釈

methodName は、型 ReadOnlySpan<T> の単一のパラメーターを受け取り、そのスパンのデータのコピーを含むビルド中のコレクションのインスタンスを返す静的メソッドを参照する必要があります。 .NET の今後のリリースでは、追加のパターンがサポートされる可能性があります。

適用対象