In this post I am going to write the points about the three type of the variable Object, Var and Dynamic. Most of the developer not able to get what is difference between this three kind of variable.
Object | Dynamic | Var |
Can able to store any kind of value, because object is the base class of all type in .net framework. | Can able to store any type of the variable, similar to old VB language variable. | Can able to store any type of value but it require to initialize at the time of declaration. |
Compiler has little information about the type | Compiler doesn’t have any information about the this type of variable. | It’s compiler safe i.e compiler has all information about the stored value, so that it doesn’t cause any issue at run-time. |
(more.....)
Read more:
Daily .Net TipsQR:
Posted via email from Jasper-net
0 comments:
Post a Comment