How do I set a class member value by its name in a string?

Marc jckj33 at gmail.com
Wed Dec 27 20:04:29 UTC 2017


I'd like to set the members of a class by its name at runtime, I 
would do something like this:

> __traits(getMember, myClass, name) = value;

but since name is only know at runtime, I can't use __traits(). 
What's a workaround for this?


More information about the Digitalmars-d-learn mailing list