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

Popular posts from this blog

java - Jmockit String final length method mocking Issue -

What is the difference between data design and data model(ERD) -

ios - Can NSManagedObject conform to NSCoding -