Link to home
Start Free TrialLog in
Avatar of sepknow
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?
ASKER CERTIFIED SOLUTION
Avatar of SteveH_UK
SteveH_UK
Flag of United Kingdom of Great Britain and Northern Ireland image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
SOLUTION
Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Thanks for the points :)