Is it good or bad practice to use var everywhere? [closed]
- by Earlz
Possible Duplicate:
Use of var keyword in C#
Hello, I've recently been discovering the awesomeness that is the var keyword in C#.
Well, I didn't think about it before but I just wrote lines of code that are along the lines of
var con=CreateNewConnection();
Where this would usually be
IdbConnection con=CreateNewConnection();
Is this a good use of var? Is it possible to use var too often? Are there any downsides to using it?
Also, one more point of consideration: We are not worried about backwards compatability. We just care that it runs on .NET 3.5