I'm not sure what is the exact different between both declarations.
When should I use var and when should I use dynamic.
Thanks a lot! Don
var is type of variable decided by the compiler at compile time. Need to initialize at the time of declaration. All errors are caught on compile time.
dynamic is type of variable decided by the compiler at runtime time. No need to initialize at the time of declaration. All errors are caught at runtime.
dynamic variables can be used to create properties and return values from a function. var variables cannot be used for property or return values from a function. They can only be used as local variable in a function.