Fork me on GitHub
TypeName SwitchToAutoPropAnalyzer
Check Id CC0017
Category Style
Severity Info

Cause

Auto properties offer a more concise way of defining a property. If you are using simple getters and setters you are able to simplify your code with autoproperties.

Example

private int id;
public int Id
{
	get { return id; }
	set { id = value; }
}

Code fix

A code fix will be presented to you that will transform the code:

public int Id { get; set; }

Code fix

Related rules

None

See also

TBD