hugi
child/parent class, how do i 'mass define' child properties?
so instead of doing
var x = data.getChild();
var y = new Parent() {age = x.age, name = x.name, score = x.score,......, MoreStuff = y}
so i am looking for something cleaner like
var y = new Parent() {child = x, MoreStuff = y}
is there any way to do it so i don thave to define every single variable separately? since it is the child of the parent component it is obvious that i am going to name them all
8 replies