.Net Dynamic Programming Interview Questions and Answers for Freshers and Experience Part-2
The difference between the var and dynamic data types is that the var data type is strongly type checked at the compile time; whereas, the dynamic data type is type checked by the compiler only at run time. After declaring a var data type, you cannot explicitly change its type throughout the execution of the program; however, a variable of the dynamic data type can be changed during runtime. Another major difference between the two is that dynamic type can also be used as the return type for methods, for which var cannot be used.
8. Which class is used for converting the data types?
The System.Convert class provides a complete set of methods for converting the data types.