Click here to Skip to main content
15,891,943 members
Articles / Programming Languages / C#

Can the C# ‘var’ keyword be misused?

Rate me:
Please Sign up or sign in to vote.
5.00/5 (2 votes)
10 Jun 2011CPOL1 min read 8.5K   1  
If the right-hand operand of an assignment is a "new", there's no need to explicitly specify the type of the new variable being created unless the new variable will have to hold items of a more general type than the right-hand operand would indicate. I would consider the code clearer without the...

Views

Daily Counts

License

This article, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)


Written By
Web Developer
Unknown
Embedded systems programmer since 1994.

Comments and Discussions