Possible Duplicates:
What to use: var or object name type?
Use of var keyword in C#
What’s the point of the var keyword?
Should I always favour implictly typed local variables in C# 3.0?
I have just installed a trial version of ReSharper to evaluate it for my company. One thing that I have noticed is it is suggesting that I change the following (made up example):
string s = "";
to
var s = "";
Is it best practice to use the var keyword rather than using the Object Type when declaring variables? What advantages does it give. For context I am a former Java developer who has just transitioned to the .Net works.