Tag: var keyword
var keyword in For Statements in C#
Below is a sample sourcecode demonstrating the usage of the var keyword within the indexes in the for statement in c#. var keyword in For Statements in C#
Use of var keyword in C#
The var keyword in C# was introduced from C# 3.0 and it beings in the feature of local type inference or implicit type variable in C#. LINQ is one of the case where var keyword can be widely used in C#. Eg: In the above example, the initialization of the name was done using “string” and hence name will be implicitly treated as string. Note…
var keyword in Foreach Statement in C#
Below is a sample sourcecode demonstrating the usage of the var keyword within the indexes in the Foreach statement in c#. var keyword in Foreach Statement in C#