TypeDescriptor.GetProperties Method (Object)
Returns the collection of properties for a specified component.
Assembly: System (in System.dll)
Parameters
- component
-
Type:
System.Object
A component to get the properties for.
Return Value
Type: System.ComponentModel.PropertyDescriptorCollectionA 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.
Available since 1.1