opIndex() overloading for multiple arrays

Nrgyzer Nrgyzer at gmail.com
Sat Sep 11 06:30:33 PDT 2010


Hey guys,

is it possible to overload opIndex() with a multiple array, for
example:

class Example {
...
char[] opIndex(uint index1, uint index2) {
return "my text to return";
}
...
}

Example t = new Example();
writefln(t[0][10]);

Looking forward to hearing from anyone :)


More information about the Digitalmars-d-learn mailing list