RefactoringEssentials icon indicating copy to clipboard operation
RefactoringEssentials copied to clipboard

Allow methods returning null to be turned into expression bodied members

Open corliss opened this issue 8 years ago • 0 comments
trafficstars

C# supports both

void Foo() 
{ 
    Bar(); 
}

and

void Foo() => Bar();

The extension does not support refactoring the block into the expression-bodied member, when the return type is void.

It does support the reverse transformation, i.e. expand expression-bodied member. However there is a bug in this case; it adds a return before Bar().

Please add, it would be very helpful.

corliss avatar Dec 19 '16 05:12 corliss