Why would var be a bad thing?

Posted by Spoike on Stack Overflow See other posts from Stack Overflow or by Spoike
Published on 2009-02-13T11:26:01Z Indexed on 2010/05/20 13:10 UTC
Read the original article Hit count: 264

I've been chatting with my colleagues the other day and heard that their coding standard explicitly forbids them to use the var keyword in C#. They had no idea why it was so and I've always found implicit declaration to be incredibly useful when coding. I've never had any problems finding out what type the variable was (you only hover over the variable in VS and you'll get the type that way).

Does anyone know why it would be a bad idea to use the var keyword in C#?

© Stack Overflow or respective owner

Related posts about subjective

Related posts about implicit-typing