Reporter |
|
---|---|
Created | Sep 9, 2010 10:23:43 PM |
Updated | Apr 7, 2018 3:06:04 PM |
Resolved | Apr 7, 2018 3:06:04 PM |
Subsystem | Context Actions |
Assignee | Alisa Afonina (alisa.afonina) |
Priority | Normal |
State | Obsolete |
Type | Feature |
Fix version | Backlog |
Affected versions | No Affected versions |
Fixed In Version ReSharper | Undefined |
VsVersion | All Versions |
Foo foo = new Foo{ Prop1 = Bar1(), Prop2 = Bar2() };
Sometimes it's necessary to move one of the initializers out. For example:
Foo foo = new Foo{ Prop2 = Bar2() };
Prop1 = Bar1();
This can be needed, for example, to make property assignment conditional, or to extract object creation into separate method.