Click here to Skip to main content
15,915,019 members
Articles / Programming Languages / C#

C# Using Var: To Var or Not To Var?

Rate me:
Please Sign up or sign in to vote.
4.64/5 (4 votes)
12 Dec 2023CPOL2 min read 7.1K   5  
The article discusses the debate over using C#'s var keyword versus explicit typed variables, highlighting potential issues with overuse of 'var' that can lead to code misunderstandings, readability challenges, and bugs.

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
United States United States
Languages/frameworks: C#, .NET, ASP.NET, C/C++, WPF
Experienced in Web development, UI development, frameworks and multi-threading.


Author of the book Essential Software Development Career + Technical Guide.
https://www.amazon.com/dp/B0BXHYWMDP/

Check out our website at:
https://essentialsoftwaredevelopment.com/

Comments and Discussions