Editorconfig Guide

Generate your .editorconfig file with ease.

Prefer expression bodied operators

csharp-style-expression-bodied-operators

Default value:

false

Possible values:

  • true
  • false
  • when_on_single_line

Examples

true
public static Person operator +(Person a, Person b)
  => new Person(a.Name + b.Name);
false
public static Person operator +(Person a, Person b)
{
  return new Person(a.Name + b.Name);
}
when_on_single_line
public static Person operator +(Person a, Person b)
  => new Person(a.Name + b.Name);