AttributeCollection Constructor (array<Attribute^>^)

 

Initializes a new instance of the AttributeCollection class.

Namespace:   System.ComponentModel
Assembly:  System (in System.dll)

public:
AttributeCollection(
	... array<Attribute^>^ attributes
)

Parameters

attributes
Type: array<System::Attribute^>^

An array of type Attribute that provides the attributes for this collection.

Exception Condition
ArgumentNullException

attributes is null.

The following code example creates a new AttributeCollection using the attributes on button1. It assumes that button1 has been created on a form.

AttributeCollection^ collection1;
collection1 = TypeDescriptor::GetAttributes( button1 );

.NET Framework
Available since 1.1
Return to top
Show: