Creating a dynamic variable

suggest change
dynamic foo = 123;
Console.WriteLine(foo + 234);
// 357
// foo.ToUpper() would throw RuntimeBinderException: int has no ToUpper method.

foo = "123";
Console.WriteLine(foo + 234);
// 123234
Console.WriteLine(foo.ToUpper());
// 123

Feedback about page:

Feedback:
Optional: your email if you want me to get back to you:



Table Of Contents