Q:

How to build a group of constant variables in c#

How can I built a group of constant variable in c#? 
For example :
IconType {
    public constant string folder = "FOLDER";
    public constant string application = "APPLICATION";
    public constant string system = "SYSTEM";
}

Then I need to use it like this ways
IconType.system
but I don't want to do declaration like IconType type = new IconType(), I want to direction access to its variable.
It just looks like JOptionPanel in java, when I want to display the icon I just need to call this JOptionPane.WARNING_MESSAGE 

A:

Just define them in a class, and since const are implicitly static you can use them 
class IconType
{
    public const string folder = "FOLDER";
    public const string application = "APPLICATION";
    public const string system = "SYSTEM";
}

Later you can use them like:
Console.WriteLine(IconType.folder);

You may see: Why can't I use static and const together? By Jon Skeet

