This documentation is archived and is not being maintained.

MethodBuilder.SetCustomAttribute Method (ConstructorInfo, Byte[])

.NET Framework 1.1

Sets a custom attribute using a specified custom attribute blob.

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

Parameters

con
The constructor for the custom attribute.
binaryAttribute
A byte blob representing the attributes.

Exceptions

Exception Type Condition
ArgumentNullException con or binaryAttribute is a null reference (Nothing in Visual Basic).

Remarks

See the metadata specification in the ECMA Partition II documentation for details on how to format binaryAttribute. The Partition II documentation is included with the .NET Framework SDK installation, and can be found in the %\Microsoft.NET\FrameworkSDK\Tool Developers Guide\docs directory.

Requirements

Platforms: Windows 98, Windows NT 4.0, Windows Millennium Edition, Windows 2000, Windows XP Home Edition, Windows XP Professional, Windows Server 2003 family

See Also

MethodBuilder Class | MethodBuilder Members | System.Reflection.Emit Namespace | MethodBuilder.SetCustomAttribute Overload List

Show: