sepknow
asked on
C# constant
Is this possible?
I have a class that defines all the constant in my application:
public class MyConstant
{
public static readonly string abc = "some name";
//...
//...
public static readonly int xyz = 1024;
//...
//...
}
It is quite inconvenient to browse through the list, thousands of them.
I would like to re-goup them within this class such that I can acess them something like this:
string a = MyConstant.Group1.abc;
int x = MyConstant.Group2.xyz;
Is it possible?
I have a class that defines all the constant in my application:
public class MyConstant
{
public static readonly string abc = "some name";
//...
//...
public static readonly int xyz = 1024;
//...
//...
}
It is quite inconvenient to browse through the list, thousands of them.
I would like to re-goup them within this class such that I can acess them something like this:
string a = MyConstant.Group1.abc;
int x = MyConstant.Group2.xyz;
Is it possible?
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Thanks for the points :)