Click here to Skip to main content
15,887,267 members
Articles / All Topics

Can the C# ‘var’ Keyword be Misused?

Rate me:
Please Sign up or sign in to vote.
5.00/5 (4 votes)
21 Jul 2011CPOL 17K   1  
More and more often I've been seeing C# code like this: var Data = GetData(); What on earth does GetData() return? This code is not as maintainable as it could be and is not as maintainable as it should be.

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
EndWell Software, Inc.
United States United States
I am an independent contractor/consultant working in the Twin Cities area in Minnesota. I work in .Net, Asp.Net, C#, C++, XML, SQL, Windows Forms, HTML, CSS, etc., etc., etc.

Comments and Discussions