Skip to main content

Change type according to expression

PropertyValue
IdRR0022
Applicable Syntaxvariable declaration, foreach statement
Syntax Spantype
Enabled by Default✓

Usage​

Example #1​

before.cs
IEnumerable<object> items = new List<object>();
after.cs
List<object> items = new List<object>();

Configuration​

roslynator_refactoring.change_type_according_to_expression.enabled = true|false