Static Associative Array

Andrej Mitrovic andrej.mitrovich at gmail.com
Sun Mar 6 16:30:00 PST 2011


What about:

enum : string[int]
{
    aa = [1: "blue", 2: "red"]
}

enum string s = aa[1];

void main()
{
    writeln(s);
}


More information about the Digitalmars-d-learn mailing list