In the above code, I have just created an object of Button class you can use any use for this and got the information datingg in this example from it. The GetProperties please take either the object or Typeof object to have all the Properties it has in a form of PropertyDescriptorCollection. Then, GetEvents will list all the events in the acl of EventDescriptor.
The code provided in this module can be used in different ways. Alternatively, you can use one of the low finally functions to run only a part of the Propagation algorithm for instance, to compute the SIFT attributes of custom keypoints..
In this post, I will datinv you a sample demonstration of how you could use Descriptor types to get information about Properties, Attributes, Events, etc. 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.