CustomAttributeBuilder コンストラクタとは? わかりやすく解説

Weblio 辞書 > コンピュータ > .NET Framework クラス ライブラリ リファレンス > CustomAttributeBuilder コンストラクタの意味・解説 

CustomAttributeBuilder コンストラクタ (ConstructorInfo, Object[])

カスタム属性コンストラクタ、およびそのコンストラクタ引数指定してCustomAttributeBuilder クラスインスタンス初期化します。

名前空間: System.Reflection.Emit
アセンブリ: mscorlib (mscorlib.dll 内)
構文構文

Public Sub New ( _
    con As ConstructorInfo, _
    constructorArgs As Object() _
)
Dim con As ConstructorInfo
Dim constructorArgs As Object()

Dim instance As New CustomAttributeBuilder(con,
 constructorArgs)
public CustomAttributeBuilder (
    ConstructorInfo con,
    Object[] constructorArgs
)
public:
CustomAttributeBuilder (
    ConstructorInfo^ con, 
    array<Object^>^ constructorArgs
)
public CustomAttributeBuilder (
    ConstructorInfo con, 
    Object[] constructorArgs
)
public function CustomAttributeBuilder (
    con : ConstructorInfo, 
    constructorArgs : Object[]
)

パラメータ

con

カスタム属性用のコンストラクタ

constructorArgs

カスタム属性コンストラクタに渡す引数

例外例外
例外種類条件

ArgumentException

con静的またはプライベートです。

または

指定され引数の数が、コンストラクタ呼び出し規約で必要とされるコンストラクタパラメータの数と一致しません。

または

指定され引数の型が、コンストラクタ内で宣言されパラメータの型と一致しません。

ArgumentNullException

conconstructorArgs、または constructorArgs 配列いずれか要素null 参照 (Visual Basic では Nothing) です。

解説解説

constructorArgs 配列要素は、要素型に制約されます。bytesbyteintuintlongulongfloatdoubleStringcharboolenumtype、これらの型のうちオブジェクトキャストされた任意の型、これらの型のインデックス番号が 0 から始まる 1 次元配列のいずれでもかまいません

プラットフォームプラットフォーム
バージョン情報バージョン情報
参照参照
関連項目
CustomAttributeBuilder クラス
CustomAttributeBuilder メンバ
System.Reflection.Emit 名前空間

CustomAttributeBuilder コンストラクタ (ConstructorInfo, Object[], PropertyInfo[], Object[], FieldInfo[], Object[])

カスタム属性コンストラクタ、そのコンストラクタ引数、名前付プロパティまたは値のペアセット、および名前付フィールドまたは値のペアセット指定してCustomAttributeBuilder クラスインスタンス初期化します。

名前空間: System.Reflection.Emit
アセンブリ: mscorlib (mscorlib.dll 内)
構文構文

Public Sub New ( _
    con As ConstructorInfo, _
    constructorArgs As Object(), _
    namedProperties As PropertyInfo(), _
    propertyValues As Object(), _
    namedFields As FieldInfo(), _
    fieldValues As Object() _
)
Dim con As ConstructorInfo
Dim constructorArgs As Object()
Dim namedProperties As PropertyInfo()
Dim propertyValues As Object()
Dim namedFields As FieldInfo()
Dim fieldValues As Object()

Dim instance As New CustomAttributeBuilder(con,
 constructorArgs, namedProperties, propertyValues, namedFields, fieldValues)
public CustomAttributeBuilder (
    ConstructorInfo con,
    Object[] constructorArgs,
    PropertyInfo[] namedProperties,
    Object[] propertyValues,
    FieldInfo[] namedFields,
    Object[] fieldValues
)
public:
CustomAttributeBuilder (
    ConstructorInfo^ con, 
    array<Object^>^ constructorArgs, 
    array<PropertyInfo^>^ namedProperties, 
    array<Object^>^ propertyValues, 
    array<FieldInfo^>^ namedFields, 
    array<Object^>^ fieldValues
)
public CustomAttributeBuilder (
    ConstructorInfo con, 
    Object[] constructorArgs, 
    PropertyInfo[] namedProperties, 
    Object[] propertyValues, 
    FieldInfo[] namedFields, 
    Object[] fieldValues
)
public function CustomAttributeBuilder (
    con : ConstructorInfo, 
    constructorArgs : Object[], 
    namedProperties : PropertyInfo[], 
    propertyValues : Object[], 
    namedFields : FieldInfo[], 
    fieldValues : Object[]
)

パラメータ

con

カスタム属性用のコンストラクタ

constructorArgs

カスタム属性コンストラクタに渡す引数

namedProperties

カスタム属性の名前付プロパティ

propertyValues

カスタム属性の名前付プロパティの値。

namedFields

カスタム属性の名前付フィールド

fieldValues

カスタム属性の名前付フィールドの値。

例外例外
例外種類条件

ArgumentException

namedProperties 配列propertyValues 配列長さ違います

または

namedFieldsnamedValues長さ違います

または

con静的またはプライベートです。

または

指定され引数の数が、コンストラクタ呼び出し規約で必要とされるコンストラクタパラメータの数と一致しません。

または

指定され引数の型が、コンストラクタ内で宣言されパラメータの型と一致しません。

または

プロパティ値の型が名前付プロパティの型と一致しません。

または

フィールド値の型が対応するフィールド型の型と一致しません。

または

プロパティ設定メソッドがありません。

または

プロパティまたはフィールドが、コンストラクタと同じクラスまたは基本クラス属していません。

ArgumentNullException

パラメータまたは配列パラメータ要素いずれかnull 参照 (Visual Basic では Nothing) です。

解説解説

constructorArgspropertyValues または fieldValues 配列要素は、要素型に制約されます。bytesbyteintuintlongulongfloatdoubleStringcharboolenumtype、これらの型のうちオブジェクトキャストされた任意の型、これらの型のインデックス番号が 0 から始まる 1 次元配列のいずれでもかまいません

プラットフォームプラットフォーム
バージョン情報バージョン情報
参照参照
関連項目
CustomAttributeBuilder クラス
CustomAttributeBuilder メンバ
System.Reflection.Emit 名前空間

CustomAttributeBuilder コンストラクタ (ConstructorInfo, Object[], PropertyInfo[], Object[])

カスタム属性コンストラクタ、そのコンストラクタ引数、および名前付プロパティまたは値のペアセット指定してCustomAttributeBuilder クラスインスタンス初期化します。

名前空間: System.Reflection.Emit
アセンブリ: mscorlib (mscorlib.dll 内)
構文構文

Public Sub New ( _
    con As ConstructorInfo, _
    constructorArgs As Object(), _
    namedProperties As PropertyInfo(), _
    propertyValues As Object() _
)
Dim con As ConstructorInfo
Dim constructorArgs As Object()
Dim namedProperties As PropertyInfo()
Dim propertyValues As Object()

Dim instance As New CustomAttributeBuilder(con,
 constructorArgs, namedProperties, propertyValues)
public CustomAttributeBuilder (
    ConstructorInfo con,
    Object[] constructorArgs,
    PropertyInfo[] namedProperties,
    Object[] propertyValues
)
public:
CustomAttributeBuilder (
    ConstructorInfo^ con, 
    array<Object^>^ constructorArgs, 
    array<PropertyInfo^>^ namedProperties, 
    array<Object^>^ propertyValues
)
public CustomAttributeBuilder (
    ConstructorInfo con, 
    Object[] constructorArgs, 
    PropertyInfo[] namedProperties, 
    Object[] propertyValues
)
public function CustomAttributeBuilder (
    con : ConstructorInfo, 
    constructorArgs : Object[], 
    namedProperties : PropertyInfo[], 
    propertyValues : Object[]
)

パラメータ

con

カスタム属性用のコンストラクタ

constructorArgs

カスタム属性コンストラクタに渡す引数

namedProperties

カスタム属性の名前付プロパティ

propertyValues

カスタム属性の名前付プロパティの値。

例外例外
例外種類条件

ArgumentException

namedProperties 配列propertyValues 配列長さ違います

または

con静的またはプライベートです。

または

指定され引数の数が、コンストラクタ呼び出し規約で必要とされるコンストラクタパラメータの数と一致しません。

または

指定され引数の型が、コンストラクタ内で宣言されパラメータの型と一致しません。

または

プロパティ値の型が名前付プロパティの型と一致しません。

または

プロパティ設定メソッドがありません。

または

プロパティが、コンストラクタと同じクラスまたは基本クラス属していません。

ArgumentNullException

パラメータいずれかnull です。または、配列パラメータ要素いずれかnull 参照 (Visual Basic では Nothing) です。

解説解説

constructorArgs 配列および propertyValues 配列要素は、要素型に制約されます。bytesbyteintuintlongulongfloatdoubleStringcharboolenumtype、これらの型のうちオブジェクトキャストされた任意の型、これらの型のインデックス番号が 0 から始まる 1 次元配列のいずれでもかまいません

プラットフォームプラットフォーム
バージョン情報バージョン情報
参照参照
関連項目
CustomAttributeBuilder クラス
CustomAttributeBuilder メンバ
System.Reflection.Emit 名前空間

CustomAttributeBuilder コンストラクタ (ConstructorInfo, Object[], FieldInfo[], Object[])

カスタム属性コンストラクタ、そのコンストラクタ引数、および名前付フィールドと値のペアセット指定してCustomAttributeBuilder クラスインスタンス初期化します。

名前空間: System.Reflection.Emit
アセンブリ: mscorlib (mscorlib.dll 内)
構文構文

Public Sub New ( _
    con As ConstructorInfo, _
    constructorArgs As Object(), _
    namedFields As FieldInfo(), _
    fieldValues As Object() _
)
Dim con As ConstructorInfo
Dim constructorArgs As Object()
Dim namedFields As FieldInfo()
Dim fieldValues As Object()

Dim instance As New CustomAttributeBuilder(con,
 constructorArgs, namedFields, fieldValues)
public CustomAttributeBuilder (
    ConstructorInfo con,
    Object[] constructorArgs,
    FieldInfo[] namedFields,
    Object[] fieldValues
)
public:
CustomAttributeBuilder (
    ConstructorInfo^ con, 
    array<Object^>^ constructorArgs, 
    array<FieldInfo^>^ namedFields, 
    array<Object^>^ fieldValues
)
public CustomAttributeBuilder (
    ConstructorInfo con, 
    Object[] constructorArgs, 
    FieldInfo[] namedFields, 
    Object[] fieldValues
)
public function CustomAttributeBuilder (
    con : ConstructorInfo, 
    constructorArgs : Object[], 
    namedFields : FieldInfo[], 
    fieldValues : Object[]
)

パラメータ

con

カスタム属性用のコンストラクタ

constructorArgs

カスタム属性コンストラクタに渡す引数

namedFields

カスタム属性の名前付フィールド

fieldValues

カスタム属性の名前付フィールドの値。

例外例外
例外種類条件

ArgumentException

namedFields 配列fieldValues 配列長さ違います

または

con静的またはプライベートです。

または

指定され引数の数が、コンストラクタ呼び出し規約で必要とされるコンストラクタパラメータの数と一致しません。

または

指定され引数の型が、コンストラクタ内で宣言されパラメータの型と一致しません。

または

フィールド値の型が名前付フィールドの型と一致しません。

または

フィールドが、コンストラクタと同じクラスまたは基本クラス属していません。

ArgumentNullException

パラメータまたは配列パラメータ要素いずれかnull 参照 (Visual Basic では Nothing) です。

解説解説

constructorArgs 配列および fieldValues 配列要素は、要素型に制約されます。bytesbyteintuintlongulongfloatdoubleStringcharboolenumtype、これらの型のうちオブジェクトキャストされた任意の型、これらの型のインデックス番号が 0 から始まる 1 次元配列のいずれでもかまいません

プラットフォームプラットフォーム
バージョン情報バージョン情報
参照参照
関連項目
CustomAttributeBuilder クラス
CustomAttributeBuilder メンバ
System.Reflection.Emit 名前空間

CustomAttributeBuilder コンストラクタ

CustomAttributeBuilder クラスインスタンス初期化します。
オーバーロードの一覧オーバーロードの一覧

名前 説明
CustomAttributeBuilder (ConstructorInfo, Object[]) カスタム属性コンストラクタ、およびそのコンストラクタ引数指定してCustomAttributeBuilder クラスインスタンス初期化します。
CustomAttributeBuilder (ConstructorInfo, Object[], FieldInfo[], Object[]) カスタム属性コンストラクタ、そのコンストラクタ引数、および名前付フィールドと値のペアセット指定してCustomAttributeBuilder クラスインスタンス初期化します。
CustomAttributeBuilder (ConstructorInfo, Object[], PropertyInfo[], Object[]) カスタム属性コンストラクタ、そのコンストラクタ引数、および名前付プロパティまたは値のペアセット指定してCustomAttributeBuilder クラスインスタンス初期化します。
CustomAttributeBuilder (ConstructorInfo, Object[], PropertyInfo[], Object[], FieldInfo[], Object[]) カスタム属性コンストラクタ、そのコンストラクタ引数、名前付プロパティまたは値のペアセット、および名前付フィールドまたは値のペアセット指定してCustomAttributeBuilder クラスインスタンス初期化します。
参照参照

関連項目

CustomAttributeBuilder クラス
CustomAttributeBuilder メンバ
System.Reflection.Emit 名前空間



英和和英テキスト翻訳>> Weblio翻訳
英語⇒日本語日本語⇒英語
  

辞書ショートカット

すべての辞書の索引

「CustomAttributeBuilder コンストラクタ」の関連用語

CustomAttributeBuilder コンストラクタのお隣キーワード
検索ランキング

   

英語⇒日本語
日本語⇒英語
   



CustomAttributeBuilder コンストラクタのページの著作権
Weblio 辞書 情報提供元は 参加元一覧 にて確認できます。

   
日本マイクロソフト株式会社日本マイクロソフト株式会社
© 2025 Microsoft.All rights reserved.

©2025 GRAS Group, Inc.RSS