Let us now discuss few capabilities of Descriptors with a slightly information about its usage. TypeDescriptor is used to get information of a Type. To use it, you need to search a component to its static methods..
TypeDescriptor is used to get information of a Type. To use it, you need to pass a component to its static methods. In the above code, I have just created an object of Button on you can use any class for this and got the information name in this example from it. The GetProperties actually take either the object or Typeof object to list all the Properties it has in a form of PropertyDescriptorCollection. Similarly, GetEvents will list all the events in the form of EventDescriptor.