Friday 23 November 2012

Implicit Typed Variables

                   Microsoft introduced new features in C# 3.0  named as implicit typed local variables, it is capable to hold any type like int, float, string, complex type etc. Implicitly typed local variable is a variable that can be declared without specifying the .NET type explicitly. It determines type at compile time.
 
              Implicit typed vlocal variables are introduced to support LINQ that create anonymous types in queries for which you want to assign variables. However, they are not only used with LINQ, you can declare and use them in your different programs.

Syntax:-
                   var  name = "Asif";

                   var    --> Keyword
                   name --> Variable name
                  

0 Comments:

Post a Comment

Subscribe to Post Comments [Atom]

<< Home