Limited Object Initializer recognition

Hi,

I have the following code with a nice suggestion from ReSharper

code1.png

Applying the suggestion will give the following code:

code2.png
ReSharper should have know that the second part of the code could also be included in the Object Initialization. By manually moving the last 4 lines under the first line the code becomes:

code3.png
Applying the suggestion now gives the following result:

code4.png

Have a nice Day!

Please sign in to leave a comment.