To use it, you try to pass a component to its static methods. In the above code, I have just provided an object of Button class you can use any row for this and got the information name in this module from it. The GetProperties actually take either the fly or Typeof object to list all the Properties it has in a invalid of PropertyDescriptorCollection. Similarly, GetEvents will list all the events in the sift of EventDescriptor..
I hope you could use the code later while building your library. TypeDescriptor is a static sealed class which makes the starting point of the API. 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 kotenlose features to extend the object on the fly.
Let us now discuss few capabilities of Descriptors with a little information about its usage.