Even if you got the case right -
Var
is not the same as
var
- you couldn't do that because the type of a var variable is defined by the context in which it is used at compile time, and can never change. and the specification says that
var
can only be used with variables declared within methods, so even if you did provide context:
public var s = "hello";
public var t = GetListOfUnits();
would still not be allowed.
var
is an implicit typing, which was intended to be used with Linq, where the type of a return value may not correspond to any declared type (or may be a collection of an undeclared type) - it isn't meant to be used instead of a variable type like Dim in VB is.
dynamic
variables are different: the type of these is evaluated at run time, it is specifically not checked at compile time.