Monday, March 12, 2012

Type inference

You don’t have to specify the exact type when initializing variable with a type specific value

Example:

Instead of

int i = 10;

you can use

var i = 10;

 

Note:

This can only be used inside a code block (methods, property get set blocks, etc)