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 -

asp.net - Razor Page Hosted on IIS 6 Fails Every Morning -

c++ - wxwidget compiling on windows command prompt -