RCS1244: Simplify 'default' expression
Properties
Property | Value |
---|---|
Default Severity | Hidden |
Minimum language version | 7.1 |
Summary
This analyzer is similar to IDE0034 but there are some differences. For example this analyzer does not simplify 'default' expression passed as an argument expression.
Examples
Example #1
diagnostic.cs
Foo M(Foo foo = default(Foo))
{
return default(Foo);
}
fix.cs
Foo M(Foo foo = default)
{
return default;
}