how to initialize immutable 2 dim array

Michal Minich michal.minich at gmail.com
Sun Oct 31 10:10:43 PDT 2010


I have global static array and I want it to initialize in module 
constructor, but I get error. I there way to do it without using enum.

immutable int[5][5] arr;

static this () {
   arr = new int[5][5]; // Error: slice arr[] is not mutable
}


More information about the Digitalmars-d-learn mailing list