Allow identical empty methods in ReSharper

Is there a way to tell ReSharper to allow parentheses with the same string for empty methods and constructors?

For example:

MyConstructor(int x) : BaseConstructor(x) { }

protected virtual void Foo() { }

If not converted to:

MyConstructor(int x) : BaseConstructor(x)
{
}

protected virtual void Foo()
{
}

In the first case, I do not need the body of the method, I just supply the parent constructor with its arguments.

In the second case, I define an “optional abstract” method, making it virtual, so the body is not required.

+4
source share
1 answer

ReSharper → ... → → # → → .
.

, , .

enter image description here

+8

Source: https://habr.com/ru/post/1609888/


All Articles