I have some confusion about the type casting in c#
scince as i know that c# highly typed cast .
but in .net 2008 we define the variable with the help of keyword var
so how the compiler know about it what kind of variable is going to define and what is the background concept here
will you please tell me.
"Local variables can be given an inferred "type" of var instead of an explicit type. The var keyword instructs the compiler to infer the type of the variable from the expression on the right side of the initialization statement. The inferred type may be a built-in type, an anonymous type, a user-defined type, or a type defined in the .NET Framework class library."