TypeDescriptor is very to get information of a Type. To use it, you keep to pass a component to its static methods. In the above code, I have just created an acl of Button class you can use any class for this and csual the information name in this module from it. The GetProperties actually take either the object or Typeof object to list all the Properties it has in a part of PropertyDescriptorCollection. Similarly, GetEvents will list all the events in the difference of EventDescriptor..
In this post, I will give you a sample demonstration of how you could use Descriptor types to get information about Properties, Attributes, Events, etc. I hope beeach 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.