+ 4

There are a good practices to use var keyword?

I come from javascript and var it is everything, I would like to know when use var un C#. Could I use it like JS?

25th May 2017, 5:08 PM
Jorge Daniel Lopez Irusta
Jorge Daniel Lopez Irusta - avatar
3 Réponses
+ 8
Yes, you can. There are some differences (no big deal), you can read more here: https://stackoverflow.com/questions/8457813/difference-between-the-implementation-of-var-in-javascript-and-c-sharp
25th May 2017, 5:20 PM
Maz
Maz - avatar
+ 7
yes, is the best way to get an order
6th Jun 2017, 6:55 PM
iephte
iephte - avatar
+ 2
Refer the code below to understand the var keyword. https://code.sololearn.com/cDP4kEFUAm8i/?ref=app
25th May 2017, 5:31 PM
Shivanand Nagarabetta
Shivanand Nagarabetta - avatar