Throughout this book, I have emphasized the importance of type and type safety. After all, C# is a strongly typed language, and you are most effective when you use the C# type system along with the compiler to eliminate any programming errors early at compile time rather than later at run time. However, there are some areas where the static, strongly-typed nature of C# creates headaches. Those areas often involve interoperability. In this chapter, I will introduce you to the
dynamic type (which is new in C# 4.0) and discuss what it means from both a language standpoint as well as a runtime standpoint.
In a nutshell,
dynamic is a static type that you can use where you would use any other static type. ...