J
Jiho Han
I am trying to retrieve the list of integer constants for a class.
I've tried to retrieve them by using TypeDescriptor.GetProperties but with
no success.
How can I get the list of declared constants or given the name of a constant
(i.e. "ABC"), retrieve its integer value?
Thanks much.
Jiho
PropertyDescriptorCollection properties =
TypeDescriptor.GetProperties(typeof(MyClass));
public class MyClass
{
public const int ABC = 1;
public const int DEF = 1000;
}
I've tried to retrieve them by using TypeDescriptor.GetProperties but with
no success.
How can I get the list of declared constants or given the name of a constant
(i.e. "ABC"), retrieve its integer value?
Thanks much.
Jiho
PropertyDescriptorCollection properties =
TypeDescriptor.GetProperties(typeof(MyClass));
public class MyClass
{
public const int ABC = 1;
public const int DEF = 1000;
}