+ 2

C# in Var keyword is it only use for int ?

16th Apr 2017, 10:45 AM
Bhavik Vaghela
Bhavik Vaghela - avatar
2 odpowiedzi
+ 2
var it's basically a not define variable, so it can be int, string, bool, etc. The type chosen by the compiler and it's mostly used, when it's not sure that what kind of variable will be the var variable (especially important to know the difference between stack and heap and the value type, reference type)
16th Apr 2017, 12:03 PM
Róbert Pécz
Róbert Pécz - avatar
+ 2
no its use for all
16th Apr 2017, 11:44 AM
Mayur Chaudhari
Mayur Chaudhari - avatar