Windows Dev Center

Information
The topic you requested is included in another documentation set. For convenience, it's displayed below. Choose Switch to see the topic in its original location.

ParameterBuilder::SetCustomAttribute Method (ConstructorInfo, array<Byte>)

Set a custom attribute using a specified custom attribute blob.

Namespace:  System.Reflection.Emit
Assembly:  mscorlib (in mscorlib.dll)

[ComVisibleAttribute(true)]
public:
void SetCustomAttribute(
	ConstructorInfo^ con, 
	array<unsigned char>^ binaryAttribute
)

Parameters

con
Type: System.Reflection::ConstructorInfo

The constructor for the custom attribute.

binaryAttribute
Type: array<System::Byte>

A byte blob representing the attributes.

ExceptionCondition
ArgumentNullException

con or binaryAttribute is nullptr.

See the metadata specification in the ECMA Partition II documentation for details on how to format binaryAttribute. The documentation is available online; see ECMA C# and Common Language Infrastructure Standards on MSDN and Standard ECMA-335 - Common Language Infrastructure (CLI) on the Ecma International Web site.

.NET Framework

Supported in: 4.6, 4.5, 4, 3.5, 3.0, 2.0, 1.1

.NET Framework Client Profile

Supported in: 4, 3.5 SP1

.NET for Windows Phone apps

Supported in: Windows Phone 8.1, Windows Phone Silverlight 8.1, Windows Phone Silverlight 8
Show:
© 2015 Microsoft