Code Inspection: Use preferred 'var' style (when type is simple)
This code inspection checks violations of
var or explicit type in local variable declarations.
Specifically, it checks variable declarations of
simple types (types without generic type parameters).
implicitly typed local variables
(also known as
introduced in C# 3.0 has become quite popular as it improves readability in many scenarios.
By default, ReSharper also encourages using of
keyword, but preferences of its usage are
flexibly configurable -
for example, you can opt for using explicit types in specific cases or everywhere and
ReSharper will help you enforce your preferences.
For more information about configuring and enforcing your preferences of using
var or explicit types in local variable declarations, see