Error!
Success!

Implicitly Typed Local Variables

0
kicks

Implicitly Typed Local Variables  (Unpublished)

C# 3.0 introduces implicitly typed local variables by way of the keyword “var”. The use of var allows one to assign a number of different types to a variable without explicitly stating that variable’s type. Var is actually not a type at all, but a keyword which instructs the compiler to infer the most appropriate type based on the value or expression to the right of the equals sign.


Kicked By:
Drop Kicked By: