c# - Possible to reference a property of an anonymous object? -
apologies if 'property' not right terminology here. not sure if it's field/member or not (interested know if pleaes comment on this).
this.add(new deemacsclass() { first = "value", second = first }); assuming 'this' list<deemacsclass>, how can similar above? second = first being invalid.
it not possible reference object being created, or other properties/methods/members of object, within collection initializer block.
Comments
Post a Comment