Dynamic (C# 4.0) & Var in a nutshell.
- by mbcrump
A Var is static typed - the compiler and runtime know the type. This can be used to save some keystrokes. The following are identical. Code Snippet var mike = "var demo"; Console.WriteLine(mike.GetType()); //Returns System.String string mike2 = "string Demo"; Console.WriteLine(mike2.GetType()); //Returns System.String A…