>>>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.
>
>I like Reshaper for lots of reasons. I change them to var whenever the initialization is obvious. If it isn't, then I leave it explicit just for readability.
>Thanks Mike
>Timothy
I don't think there is any performance difference; however, my preference is to use var only in Linq....which is what is was designed for since linq queries change the typing..