In C#, we have "dynamic"
. Here, both create a variable whose type will not be known until runtime, and whose misuse will not be discovered until runtime. C#'s var creates a variable whose type is known at compile time.
dynamic dt= new DateTime();
//compiles fine but gives an error at runtime
Thanks and Regards
Asked In: Some Interviews |