KnowledgeHub
Questions
Tags
Users
Search
Alex Rivera
|
Logout
Edit Question
Title
Body
Earlier I asked a question about why I see so many examples use the var keyword and got the answer that while it is only necessary for anonymous types, that it is used nonetheless to make writing code 'quicker'/easier and 'just because'. Following this link ("C# 3.0 - Var Isn't Objec") I saw that var gets compiled down to the correct type in the IL (you will see it about midway down article). My question is how much more, if any, IL code does using the var keyword take, and would it be even close to having a measurable level on the performance of the code if it was used everywhere?
Tags (comma-separated)
Save Edits
Cancel