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、 sbyte、 int、 uint、 long、 ulong、 float、 double、 Stringchar、 bool、列挙型、オブジェクトにキャストされた以前の型のいずれか、または前の型の単一次元の 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配列の長さは異なります。
-又は-
con は静的またはプライベートです。
-又は-
指定された引数の数が、コンストラクターの呼び出し規則で必要とされるコンストラクターのパラメーターの数と一致しません。
-又は-
指定された引数の型が、コンストラクターで宣言されているパラメーターの型と一致しません。
-又は-
フィールド値の型が、名前付きフィールドの型と一致しません。
-又は-
このフィールドは、コンストラクターと同じクラスまたは基底クラスに属していません。
-又は-
パラメーターの 1 つが nullです。
注釈
constructorArgsおよびfieldValues配列の要素は、要素型に制限されます。 これらは、 byte、 sbyte、 int、 uint、 long、 ulong、 float、 double、 Stringchar、 bool、列挙型、オブジェクトにキャストされた以前の型のいずれか、または前の型の単一次元の 0 から始まる配列です。
Important
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配列の長さは異なります。
-又は-
con は静的またはプライベートです。
-又は-
指定された引数の数が、コンストラクターの呼び出し規則で必要とされるコンストラクターのパラメーターの数と一致しません。
-又は-
指定された引数の型が、コンストラクターで宣言されているパラメーターの型と一致しません。
-又は-
プロパティ値の型が、名前付きプロパティの型と一致しません。
-又は-
プロパティにセッター メソッドがありません。
-又は-
プロパティは、コンストラクターと同じクラスまたは基底クラスに属していません。
-又は-
パラメーターの 1 つが nullです。
注釈
constructorArgsおよびpropertyValues配列の要素は、要素型に制限されます。 これらは、 byte、 sbyte、 int、 uint、 long、 ulong、 float、 double、 Stringchar、 bool、列挙型、オブジェクトにキャストされた以前の型のいずれか、または前の型の単一次元の 0 から始まる配列です。
Important
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 は静的またはプライベートです。
-又は-
指定された引数の数が、コンストラクターの呼び出し規則で必要とされるコンストラクターのパラメーターの数と一致しません。
-又は-
指定された引数の型が、コンストラクターで宣言されているパラメーターの型と一致しません。
-又は-
プロパティ値の型が、名前付きプロパティの型と一致しません。
-又は-
フィールド値の型が、対応するフィールド型の型と一致しません。
-又は-
プロパティにセッターがありません。
-又は-
プロパティまたはフィールドは、コンストラクターと同じクラスまたは基底クラスに属していません。
-又は-
パラメーターの 1 つが nullです。
注釈
constructorArgs、propertyValues、またはfieldValues配列の要素は、要素型に制限されます。 これらは、 byte、 sbyte、 int、 uint、 long、 ulong、 float、 double、 Stringchar、 bool、列挙型、オブジェクトにキャストされた以前の型のいずれか、または前の型の単一次元の 0 から始まる配列です。
Important
namedPropertiesまたはnamedFieldsにプライベート プロパティまたはフィールドを含めないでください。 これを行うと、CustomAttributeFormatException メソッドが後で完了した型で呼び出されたときに、GetCustomAttributesがスローされます。