code-cracker / code-cracker

An analyzer library for C# and VB that uses Roslyn to produce refactorings, code analysis, and other niceties.

Home Page:http://code-cracker.github.io/

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Use class initializer where it makes sense

giggio opened this issue · comments

var p = new Person();
p.Name = "Giovanni";
p.Age = 25;

Becomes:

var p = new Person
{
    Name = "Giovanni",
    Age = 25;
};