TypeDescriptor::GetProperties Method (Object^)

 

Returns the collection of properties for a specified component.

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

public:
static PropertyDescriptorCollection^ GetProperties(
	Object^ component
)

Parameters

component
Type: System::Object^

A component to get the properties for.

Return Value

Type: System.ComponentModel::PropertyDescriptorCollection^

A PropertyDescriptorCollection with the properties for the specified component.

Exception Condition
NotSupportedException

component is a cross-process remoted object.

The properties for a component can differ from the properties of a class, because the site can add or remove properties if the component is sited.

If the component parameter is null, an empty collection is returned.

The order of the returned collection is not guaranteed to be identical between calls, so always order it before use.

The following code example demonstrates the use of the GetProperties method to access the properties of a control. This code example is part of a larger example provided for the ComponentDesigner class.

No code example is currently available or this language may not be supported.

.NET Framework
Available since 1.1
Return to top
Show: