指定されたカスタム属性 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 セキュリティ:
- ReflectionPermission SecurityAction.Demand、ReflectionEmit
参照
ModuleBuilder クラス | ModuleBuilder メンバ | System.Reflection.Emit 名前空間 | ModuleBuilder.SetCustomAttribute オーバーロードの一覧