The Difference between Var and Dynamic
Posted on November 8th , 2010 by Admin
|
|
When we use type Var complier determined datatype at compile time on the other hand when we use Dynamic type it is determined at run time.Dynamic type can also be used as the return type for methods but Var is not used for that.We can not use Var type without the associated method. But we can use dynamic without associated method.If we are doing subtraction, multiplication and division operations, then using Dynamic type really saves time as we do not need |
| to create separate methods for each data type like integer and double.The Dynamic type is also very helpful when interoperating with Office Automation API. |
|
|