Could someone please tell me what the C# equivalent of this VB.NET code is:
Dim aPropInfo() As System.Reflecti on.PropertyInfo
aPropInfo = GetType(System. Drawing.Color). GetProperties
This is what I came up with:
Color dummy = new Color();
System.Reflecti on.PropertyInfo[] aPropInfo =
dummy.GetType() .GetProperties( );
but maybe there is a more elegant way of getting the type without creating a
dummy Color object?
Dim aPropInfo() As System.Reflecti on.PropertyInfo
aPropInfo = GetType(System. Drawing.Color). GetProperties
This is what I came up with:
Color dummy = new Color();
System.Reflecti on.PropertyInfo[] aPropInfo =
dummy.GetType() .GetProperties( );
but maybe there is a more elegant way of getting the type without creating a
dummy Color object?
Comment