Possible Duplicate:
Use of var keyword in C#
Which declaration should be accepted ?
var str = "Hi";
OR
string str = "Hi";
Even, my team lead always asks me to use 'var' when I iterate through collection using foreach, although the collection is typed one!
In C#, we usually declare variables explicitly. But I have a ReShaper installed and it prompts to change declaration from 'string' to 'var'. Is it a good practice? If yes, why?