Answer: var If you are use the var keyword, then it valid type against right side value on declaration time Example: var data = "name";
Console.WriteLine(data); Here var will be string type at compile time. dynamic If you are use the dynamic keyword, the type will be decide on run time. Example: dynamic data = "name";
data = 8;
Console.WriteLine(data); it will compile without any error, at run time data variable type is a int than string.because in the second line of code, you have change to string to in value on right hand side. |