+ 2

Var

What does var mean? Please can anybody help me ?

5th Aug 2018, 8:14 PM
kaskej
kaskej - avatar
2 Respostas
+ 4
It means that the type of the local being declared will be inferred by the compiler. Here you can get more information: https://www.dotnetperls.com/var https://www.intertech.com/Blog/the-use-and-abuse-of-the-c-var-keyword/
5th Aug 2018, 8:28 PM
Mickel
Mickel - avatar
+ 2
It means the data type is derived (implied) from the context. From http://msdn.microsoft.com/en-us/library/bb383973.aspx. Beginning in Visual C# 3.0, variables that are declared at method scope can have an implicit type var.
11th Aug 2018, 5:50 AM
deepak sharma
deepak sharma - avatar