What is var keyword ?

variables that are declared at method scope can have an implicit type var. An implicitly typed local variable is strongly typed just as if you had declared the type yourself, but the compiler determines the type.

The following two declarations of i are functionally equivalent:

var i = 10; // implicitly typed
int i = 10; //explicitly typed


Since March 2011, have 4 years of extensive hands on experience of software development.

Leave a Reply

Your email address will not be published. Required fields are marked *