+ 2
About var data type.
if var itself identifies the value and automatically declares the variable so why we need to use other data types as var does the work?
2 Respuestas
+ 1
Var is a Keyword and is used to declare the variables such ass array string etc.
Do not use var to declare the data type for the property (properties) as well as the return type of the method (method) in the class.
- 1
Var is a box around a variable. In this way the variables can be passed more easily through methods. Notice that the type is set on initialisation. Notice also that is not the same as the historic undefined var. Really you need strong data typing to prevent you from strange u expected errors.