Permalink
Fetching contributors…
Cannot retrieve contributors at this time
40 lines (27 sloc) 791 Bytes

Replace object creation with default value

Property Value
Id RR0185
Title Replace object creation with default value
Syntax object creation expression
Enabled by Default

Usage

Before

var x = new object();

After

object x = null;

Before

var arr = new object[0];

After

object[] arr = null;

full list of refactorings

(Generated with DotMarkdown)