Add a variable to a class instance at runtime: Difference between revisions
Content deleted Content added
Rewritten D entries |
Improved first D entry |
||
Line 218:
d2.b = 11;
d2.c = ['x':2, 'y':4];
d2.d = (int x) => x ^^ 3;
writeln(d2.a, " ", d2.b, " ", d2.c);
immutable int x = d2.b.get!int;
|