The benefit of var is that it makes code more portable. If you don't explicitly type something and you later end up changing a type name or new type altogether but keep the interface the same the code still works without further changes to your code or refactoring.
Under the covers the compiler does your work for you. It's a minor thing and I used to think it was better to use explicit types, but it saves a few short brain cycles and typing to do something like this:
var items = new List<ChmImportItem>();
instead of the duplication that is:
List<ChmImportItem> items = new List<ChmImportItem>();
No less clear what's happening but a bit less typing.
+++ Rick ---
>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