C# 'var' keyword versus explicitly defined variables [duplicate]
问题 This question already has an answer here: Use of var keyword in C# 86 answers I'm currently using ReSharper's 30-day trial, and so far I've been impressed with the suggestions it makes. One suggestion puzzles me, however. When I explicitly define a variable, such as: List<String> lstString = new List<String>(); ReSharped adds a little squiggly green line and tells me to: Use implicitly type local variable declaration. If I then follow its suggestion, ReSharper changes the line of code to: var