class initialization

Marc jckj33 at gmail.com
Tue Jan 16 03:23:20 UTC 2018


in C# you can initilizate the class members like this:

> var foo = new Foo { a = 1, b = 2 };

I found something similar to structs in D:

> myStruct S = {a:1, b:2};

But can't figure out if D does have that for classes.



More information about the Digitalmars-d-learn mailing list