Friday, April 15, 2011

C# - The evils of var

Today I was trying to modify a collection of classes and interfaces used across 50 different applications. I wanted to remove some unused interfaces and did a quick grep for one and found that it was not used in any of the applications. I removed it and tried to recompile and found that it was used, just anonymously via "var". I have yet to come up with any reason to use var except for laziness...

No comments:

Post a Comment