array of constants?

Lloyd Dupont ld-REMOVE at galador.net
Fri Jun 3 07:58:23 PDT 2011


thanks!

"Etherous"  wrote in message news:is8dbh$n22$1 at digitalmars.com... 

You need to set it in a static constructor
immutable string[int] MyDict;

static this ()
{
  MyDict = cast(string[int]) [
  1: "monday",
  2: "tuesday"
  ];
}


More information about the Digitalmars-d-learn mailing list