Monday, July 13, 2009

Implicitly Type local variable

The Implicitly Type local variable being declared is inferred from the expression used to initialize variable.

E.g : var i =10;
var s="anish";

Note : it can be a anonymous type ,user defined type or FCL(frame work class library) type etc.But the compiler determines the type.

E.g: var i =10//implicitly typed
int i=10//Explicitly typed

0 comments:

 
Counter