- 1
Can't use var as a acceptable answer?
asking to declare int and set 43, why can't we use var as a acceptable alternative solution?
1 Odpowiedź
+ 8
generally uses var only when it is required. An implicitly typed local variable is strongly typed just as if you had declared the type yourself, but the compiler determines the type. Local variables can be given an inferred "type" of var instead of an explicit type.