Skip to content

Latest commit

 

History

History
22 lines (15 loc) · 358 Bytes

File metadata and controls

22 lines (15 loc) · 358 Bytes

GCop 647

"Shorten this property by defining it as expression-bodied."

Rule description

Where the body of a property getter is a small single line, it can be written in a briefer format.

Example

public string Property
{
    get { return "something"; }
}

should be 🡻

public string Property => "something";