CustomAttributeBuilder コンストラクター
定義
重要
一部の情報は、リリース前に大きく変更される可能性があるプレリリースされた製品に関するものです。 Microsoft は、ここに記載されている情報について、明示または黙示を問わず、一切保証しません。
CustomAttributeBuilder クラスのインスタンスを初期化します。
オーバーロード
| CustomAttributeBuilder(ConstructorInfo, Object[]) |
カスタム属性のコンストラクター、およびコンストラクターに渡す引数を指定して、 |
| CustomAttributeBuilder(ConstructorInfo, Object[], FieldInfo[], Object[]) |
カスタム属性のコンストラクター、そのコンストラクターの引数、および名前付きフィールドと値のペアのセットを指定して、 |
| CustomAttributeBuilder(ConstructorInfo, Object[], PropertyInfo[], Object[]) |
カスタム属性のコンストラクター、そのコンストラクターの引数、および名前付きプロパティまたは値のペアのセットを指定して、 |
| CustomAttributeBuilder(ConstructorInfo, Object[], PropertyInfo[], Object[], FieldInfo[], Object[]) |
カスタム属性のコンストラクター、そのコンストラクターの引数、名前付きプロパティまたは値のペアのセット、および名前付きフィールドまたは値のペアのセットを指定して、 |
CustomAttributeBuilder(ConstructorInfo, Object[])
カスタム属性のコンストラクター、およびコンストラクターに渡す引数を指定して、CustomAttributeBuilder クラスのインスタンスを初期化します。
public:
CustomAttributeBuilder(System::Reflection::ConstructorInfo ^ con, cli::array <System::Object ^> ^ constructorArgs);
public CustomAttributeBuilder (System.Reflection.ConstructorInfo con, object?[] constructorArgs);
public CustomAttributeBuilder (System.Reflection.ConstructorInfo con, object[] constructorArgs);
new System.Reflection.Emit.CustomAttributeBuilder : System.Reflection.ConstructorInfo * obj[] -> System.Reflection.Emit.CustomAttributeBuilder
Public Sub New (con As ConstructorInfo, constructorArgs As Object())
パラメーター
- con
- ConstructorInfo
カスタム属性のコンストラクター。
- constructorArgs
- Object[]
カスタム属性のコンストラクターに渡す引数。
例外
con が静的またはプライベートです。
con または constructorArgs が null です。
注釈
配列の constructorArgs 要素は要素型に制限されます。 オブジェクトにbyte``int``String``char``sbyte``long``bool``uint``ulong``float``doubleキャストされた前の型のいずれか、または前のいずれかの型の単一次元の 0 から始まる配列を、、列挙型、型、またはできます。
適用対象
CustomAttributeBuilder(ConstructorInfo, Object[], FieldInfo[], Object[])
カスタム属性のコンストラクター、そのコンストラクターの引数、および名前付きフィールドと値のペアのセットを指定して、CustomAttributeBuilder クラスのインスタンスを初期化します。
public:
CustomAttributeBuilder(System::Reflection::ConstructorInfo ^ con, cli::array <System::Object ^> ^ constructorArgs, cli::array <System::Reflection::FieldInfo ^> ^ namedFields, cli::array <System::Object ^> ^ fieldValues);
public CustomAttributeBuilder (System.Reflection.ConstructorInfo con, object?[] constructorArgs, System.Reflection.FieldInfo[] namedFields, object?[] fieldValues);
public CustomAttributeBuilder (System.Reflection.ConstructorInfo con, object[] constructorArgs, System.Reflection.FieldInfo[] namedFields, object[] fieldValues);
public CustomAttributeBuilder (System.Reflection.ConstructorInfo con, object?[] constructorArgs, System.Reflection.FieldInfo[] namedFields, object[] fieldValues);
new System.Reflection.Emit.CustomAttributeBuilder : System.Reflection.ConstructorInfo * obj[] * System.Reflection.FieldInfo[] * obj[] -> System.Reflection.Emit.CustomAttributeBuilder
Public Sub New (con As ConstructorInfo, constructorArgs As Object(), namedFields As FieldInfo(), fieldValues As Object())
パラメーター
- con
- ConstructorInfo
カスタム属性のコンストラクター。
- constructorArgs
- Object[]
カスタム属性のコンストラクターに渡す引数。
- namedFields
- FieldInfo[]
カスタム属性の名前付きフィールド。
- fieldValues
- Object[]
カスタム属性の名前付きフィールドの値。
例外
namedFields 配列と fieldValues 配列の長さが違います。
パラメーターの 1 つが null です。
注釈
要素とfieldValues配列のconstructorArgs要素は、要素型に制限されます。 オブジェクトにbyte``int``String``char``sbyte``long``bool``uint``ulong``float``doubleキャストされた前の型のいずれか、または前のいずれかの型の単一次元の 0 から始まる配列を、、列挙型、型、またはできます。
重要
にプライベート フィールドを namedFields含めないでください。 これを行うと、 CustomAttributeFormatException 後で完了した型で GetCustomAttributes メソッドが呼び出されたときにスローされます。
適用対象
CustomAttributeBuilder(ConstructorInfo, Object[], PropertyInfo[], Object[])
カスタム属性のコンストラクター、そのコンストラクターの引数、および名前付きプロパティまたは値のペアのセットを指定して、CustomAttributeBuilder クラスのインスタンスを初期化します。
public:
CustomAttributeBuilder(System::Reflection::ConstructorInfo ^ con, cli::array <System::Object ^> ^ constructorArgs, cli::array <System::Reflection::PropertyInfo ^> ^ namedProperties, cli::array <System::Object ^> ^ propertyValues);
public CustomAttributeBuilder (System.Reflection.ConstructorInfo con, object?[] constructorArgs, System.Reflection.PropertyInfo[] namedProperties, object?[] propertyValues);
public CustomAttributeBuilder (System.Reflection.ConstructorInfo con, object[] constructorArgs, System.Reflection.PropertyInfo[] namedProperties, object[] propertyValues);
public CustomAttributeBuilder (System.Reflection.ConstructorInfo con, object?[] constructorArgs, System.Reflection.PropertyInfo[] namedProperties, object[] propertyValues);
new System.Reflection.Emit.CustomAttributeBuilder : System.Reflection.ConstructorInfo * obj[] * System.Reflection.PropertyInfo[] * obj[] -> System.Reflection.Emit.CustomAttributeBuilder
Public Sub New (con As ConstructorInfo, constructorArgs As Object(), namedProperties As PropertyInfo(), propertyValues As Object())
パラメーター
- con
- ConstructorInfo
カスタム属性のコンストラクター。
- constructorArgs
- Object[]
カスタム属性のコンストラクターに渡す引数。
- namedProperties
- PropertyInfo[]
カスタム属性の名前付きプロパティ。
- propertyValues
- Object[]
カスタム属性の名前付きプロパティの値。
例外
namedProperties 配列と propertyValues 配列の長さが違います。
パラメーターの 1 つが null です。
注釈
要素とpropertyValues配列のconstructorArgs要素は、要素型に制限されます。 オブジェクトにbyte``int``String``char``sbyte``long``bool``uint``ulong``float``doubleキャストされた前の型のいずれか、または前のいずれかの型の単一次元の 0 から始まる配列を、、列挙型、型、またはできます。
重要
にプライベート プロパティを namedProperties含めないでください。 これを行うと、 CustomAttributeFormatException 後で完了した型で GetCustomAttributes メソッドが呼び出されたときにスローされます。
適用対象
CustomAttributeBuilder(ConstructorInfo, Object[], PropertyInfo[], Object[], FieldInfo[], Object[])
カスタム属性のコンストラクター、そのコンストラクターの引数、名前付きプロパティまたは値のペアのセット、および名前付きフィールドまたは値のペアのセットを指定して、CustomAttributeBuilder クラスのインスタンスを初期化します。
public:
CustomAttributeBuilder(System::Reflection::ConstructorInfo ^ con, cli::array <System::Object ^> ^ constructorArgs, cli::array <System::Reflection::PropertyInfo ^> ^ namedProperties, cli::array <System::Object ^> ^ propertyValues, cli::array <System::Reflection::FieldInfo ^> ^ namedFields, cli::array <System::Object ^> ^ fieldValues);
public CustomAttributeBuilder (System.Reflection.ConstructorInfo con, object?[] constructorArgs, System.Reflection.PropertyInfo[] namedProperties, object?[] propertyValues, System.Reflection.FieldInfo[] namedFields, object?[] fieldValues);
public CustomAttributeBuilder (System.Reflection.ConstructorInfo con, object[] constructorArgs, System.Reflection.PropertyInfo[] namedProperties, object[] propertyValues, System.Reflection.FieldInfo[] namedFields, object[] fieldValues);
public CustomAttributeBuilder (System.Reflection.ConstructorInfo con, object?[] constructorArgs, System.Reflection.PropertyInfo[] namedProperties, object[] propertyValues, System.Reflection.FieldInfo[] namedFields, object[] fieldValues);
new System.Reflection.Emit.CustomAttributeBuilder : System.Reflection.ConstructorInfo * obj[] * System.Reflection.PropertyInfo[] * obj[] * System.Reflection.FieldInfo[] * obj[] -> System.Reflection.Emit.CustomAttributeBuilder
Public Sub New (con As ConstructorInfo, constructorArgs As Object(), namedProperties As PropertyInfo(), propertyValues As Object(), namedFields As FieldInfo(), fieldValues As Object())
パラメーター
- con
- ConstructorInfo
カスタム属性のコンストラクター。
- constructorArgs
- Object[]
カスタム属性のコンストラクターに渡す引数。
- namedProperties
- PropertyInfo[]
カスタム属性の名前付きプロパティ。
- propertyValues
- Object[]
カスタム属性の名前付きプロパティの値。
- namedFields
- FieldInfo[]
カスタム属性の名前付きフィールド。
- fieldValues
- Object[]
カスタム属性の名前付きフィールドの値。
例外
namedProperties 配列と propertyValues 配列の長さが違います。
または -
namedFields配列とfieldValues配列の長さが違います。または -
conが静的またはプライベートです。または - 指定した引数の数が、コンストラクターの呼び出し規約で求められるコンストラクターのパラメーターの数と一致しません。
または - 指定した引数の型は、コンストラクターで宣言されているパラメーターの型と一致しません。
または - プロパティ値の型が名前付きプロパティの型と一致しません。
または - フィールド値の型が、対応するフィールド型の型と一致しません。
または - プロパティにセッター メソッドがありません。
または - プロパティまたはフィールドが、コンストラクターと同じクラスまたは基本クラスに属していません。
または - 指定された引数、名前付きプロパティ、または名前付きフィールドが String または Type 以外の参照型です。
パラメーターの 1 つが null です。
注釈
、propertyValuesまたはfieldValues配列のconstructorArgs要素は、要素型に制限されます。 オブジェクトにbyte``int``String``char``sbyte``long``bool``uint``ulong``float``doubleキャストされた前の型のいずれか、または前のいずれかの型の単一次元の 0 から始まる配列を、、列挙型、型、またはできます。
重要
プライベート プロパティまたはフィールドをnamedProperties``namedFields含めないでください。 これを行うと、 CustomAttributeFormatException 後で完了した型で GetCustomAttributes メソッドが呼び出されたときにスローされます。