Dynamic and var data types

Differentiate the terms dynamic and var data types?

E

Expert

Verified

The var data type is strongly type checked at a compile time; while, dynamic data type is type checked by a compiler only during the run time. Later than declaring the var data type, we cannot explicitly alter its type during the execution of a program; though, the variable of a dynamic data type can be altered at runtime. Other most important difference among two is that dynamic type could also be used as a return type for the methods, for that var cannot be used.

   Related Questions in DOT NET Programming

©TutorsGlobe All rights reserved 2022-2023.