Tag Archives: PropertyInfo class

How to generate random colors in C#

Introduction In an application I required to generate some random colors. Writing these colors manually was not easy. So I decided to use .NET Reflection to generate colors using System.Drawing.Color class Description We can use GetProperties method of Type class to get all the properties of Color class. It returns an array of PropertyInfo class.… Read More »

How to get class information using .NET Reflection

In this article I will explain how to get properties, methods and events of class using .NET Reflection Download Introduction In this article we will see how to get class or type information of all the types inside System.Windows.Forms assembly. We will list all the properties, methods, and events of the selected class. We will… Read More »