public int Add(int a, int b)
{
object i = 100;
i = i + 200; // not allow arithmetic operations
var s = 100;
s = s + 100; // No error compile type checking
dynamic ss = 100;
ss = ss + 200;
Console.WriteLine(ss);
ss = "Hi"; // No error runtime type checking
}
No comments:
Post a Comment