-2

what is the difference between the following syntax

      1.  var dtm = new DataTableManager();
      2.  DataTableManager dtm1 = new DataTableManager();

Many thanks,

1 Answers1

0

There is absolutely no difference if used within a method. You cannot use var as a class scoped variable through. Also var can be used to handle anonymous types, which is not possible otherwise.

For more information check out http://msdn.microsoft.com/en-us/library/bb384061.aspx

Savvas Kleanthous
  • 2,695
  • 17
  • 18