次の方法で共有


TypeBuilder.SetCustomAttribute メソッド (ConstructorInfo, Byte[])

指定されたカスタム属性 BLOB を使用して、カスタム属性を設定します。

Overloads Public Sub SetCustomAttribute( _
   ByVal con As ConstructorInfo, _   ByVal binaryAttribute() As Byte _)
[C#]
public void SetCustomAttribute(ConstructorInfocon,byte[] binaryAttribute);
[C++]
public: void SetCustomAttribute(ConstructorInfo* con,unsigned charbinaryAttribute __gc[]);
[JScript]
public function SetCustomAttribute(
   con : ConstructorInfo,binaryAttribute : Byte[]);

パラメータ

  • con
    カスタム属性用のコンストラクタ。
  • binaryAttribute
    属性を表すバイト BLOB。

例外

例外の種類 条件
ArgumentNullException con または binaryAttribute が null 参照 (Visual Basic では Nothing) です。

解説

binaryAttribute の書式設定方法については、ECMA Partition II のマニュアルのメタデータの仕様を参照してください。Partition II のマニュアルは .NET Framework SDK のインストールに含まれています。これは %\Microsoft.NET\FrameworkSDK\Tool Developers Guide\docs ディレクトリにあります。

必要条件

プラットフォーム: Windows 98, Windows NT 4.0, Windows Millennium Edition, Windows 2000, Windows XP Home Edition, Windows XP Professional, Windows Server 2003 ファミリ

.NET Framework セキュリティ:

参照

TypeBuilder クラス | TypeBuilder メンバ | System.Reflection.Emit 名前空間 | TypeBuilder.SetCustomAttribute オーバーロードの一覧