Generic array

RenatoL rexlen at gmail.com
Tue Nov 15 15:15:42 PST 2011


##[3] arr = [0, "aa", 2.4];

What can i put instead of ##?

In C#, just for example, i can write:

object[] ar1 = new object[3];
ar1[0] = 1;
ar1[1] = "hello";
ar1[2] = 'a';

and it works. But in D

Object[3] arr0 = [0, "aa", 2.4];

and  compiler complains....


More information about the Digitalmars-d-learn mailing list