Info
Version: | 1.0.6042.27567 |
Author(s): | Francesco Bonacci |
Last Update: | Sunday, July 17, 2016 |
.NET Fiddle: | Create the first Fiddle |
NuGet Url: | https://www.nuget.org/packages/VarAnalyzer |
Install
Install-Package VarAnalyzer
dotnet add package VarAnalyzer
paket add VarAnalyzer
VarAnalyzer Download (Unzip the "nupkg" after downloading)
Dependencies
Tags
This analyzer is inspired by Jeremy post at http://jeremybytes.blogspot.it/2014/02/demystifying-var-keyword-in-c.html.
VarAnalyzer is an Analyzer with Code Fix developed using the Roslyn platform.
It allows users to get a warning each time they declare var construct in a non-legit context and it provides an option to infer the type.
var keyword should just be used to incapsulate anonymous types and collection of anonymous types. Uses of the var keyword for non-anonymous types make C# code hardly readable.