You need to set it in a static constructor immutable string[int] MyDict;
static this () { MyDict = cast(string[int]) [ 1: "monday", 2: "tuesday" ]; }
You need to set it in a static constructor immutable string[int] MyDict;
static this () { MyDict = cast(string[int]) [ 1: "monday", 2: "tuesday" ]; }