This is a mirror of official site: http://jasper-net.blogspot.com/

Difference between Object, Dynamic and Var

| Monday, August 1, 2011
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 Tips
QR: https://chart.googleapis.com/chart?chs=80x80&cht=qr&choe=UTF-8&chl=http://dailydotnettips.com/2011/07/29/object-dynamic-and-var-2/

Posted via email from Jasper-net

0 comments: