I had a method that has an empty body like this:
public void Foo()
{
}
As suggested ReSharper
, I wanted to transform it into an expression body in order to save some space, and it became as follows:
public void Foo() => ;
What does not compile. Is there a specific reason why this is not supported?
And I think I should open the ticket with an error for ReSharper
, because it will reorganize the code into a non-compiled version.
source
share