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 _
public void SetCustomAttribute(
 ConstructorInfo con,
 byte[] binaryAttribute
public: void SetCustomAttribute(
 ConstructorInfo* con,
 unsigned char binaryAttribute __gc[]
public function SetCustomAttribute(
   con : ConstructorInfo,
 binaryAttribute : Byte[]


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


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


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.


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