Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Using var benefits
Message
From
27/05/2011 10:45:43
 
 
To
27/05/2011 10:15:34
Timothy Bryan
Sharpline Consultants
Conroe, Texas, United States
General information
Forum:
ASP.NET
Category:
Coding, syntax and commands
Environment versions
Environment:
C# 4.0
OS:
Windows XP SP2
Miscellaneous
Thread ID:
01512055
Message ID:
01512057
Views:
58
No.

But I think it has bigger implications as it makes it harder to read the code and understand what it does. I only use var for things like LINQ, where you aren't quite sure what the resulting value will be.

>Hi all,
>
>Is there any performance benefits to using or not using var to declare objects?
>
>Is this better in some way (or not)
>
>DBRange range = new DBRange();
>
>over this:
>var range = new DBRange();
>
>Thanks
Craig Berntson
MCSD, Microsoft .Net MVP, Grape City Community Influencer
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform