Question

I am trying how figure how to setup like for instance

Color.RGG.Black which equal to "#000000"

I am trying to make it similar like that and implement into my Constants Class. How do I do this?

Constants.Page.Title.MyCase equal to "My Case";

Thanks

Was it helpful?

Solution

You can set that up by using nested static classes:

public static class Constants
{
    public static class Page
    {
        public static class Title
        {
            public const string MyCase = "MyCase";
        }
    }
}
Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top