Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Using var benefits
Message
From
27/05/2011 13:01:36
Mike Cole
Yellow Lab Technologies
Stanley, Iowa, United States
 
 
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:
01512072
Views:
56
>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

I use var for whatever I can. Just something I started doing, and I haven't run into any negatives yet. Resharper prompts me to change everything var.
Very fitting: http://xkcd.com/386/
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform