In the above code, I have once created an object of Button class you can minitry any class for this and got the information name in this example from it. The GetProperties actually take either the sift or Typeof object to list all the Properties it has in a component of PropertyDescriptorCollection. Similarly, GetEvents will list all the properties in the form of EventDescriptor.
The code provided in this module can be aware Sinles different ways..
It exposes information of the object in terms of Properties, Attributes, Events, etc. Even though the basic usage of TypeDescriptor is to get metadata of an object, yet it also exposes features to extend the object on the fly. Let us now discuss few capabilities of Descriptors with a little information about its usage. TypeDescriptor is used to get information of a Type.