I've always used var
because ReSharper suggested it by default. However, like most people, I only did this when I didn't understand the conotations of ReSharper's suggestion. Now I disable this suggestion in the plug-in, and in actual fact, I prefer to use the fully qualified name on at least one side of the operand. This still means I use var
occasionally.
Having used StyleCop in a few of the places I've worked, I came to the conclusion that it does not matter what style of language you use, whether you use var
or not - so long as you and your team all agree to that style for the project.
The only thing that truly makes code unmaintainable is inflexible developers who cannot accept that there's is not the only way in the world. Better to learn to just reach a consensus with the rest of the team.
We agree on the maximum amount of whitespace, whether the using
statement should be inside the namespace declaration or outside (as default). We also choose whether to add a signature to our classes (making it easier to ask questions about a potentially unmaintainable class - and many other things.
In the long run though - little issues like this are less important than achieving working deliverables.