@DaveVoyles No. "var" is just a shortcut for "use the type of the thing being assigned to this new variable"
C#: Any diff b/t var newDevice = new CompanionDevice(); and CompanionDevice newDevice = new CompanionDevice();
-
-
-
@DaveVoyles (well, it has other uses for dynamic types and linq and the like, but in this case, it's just a shorthand) - Show replies
New conversation -
-
-
@DaveVoyles only readability … the compiler can infer the type from the right side of the expression. -
@joelmartinez That's what I figured. it's been a while since I've used C#. thanks!
End of conversation
New conversation -
-
-
@DaveVoyles Var is implicit and determined at compile time. There shouldn't be any performance difference. -
@The_Rabbit42 The perf was my biggest concern. So used to using "var" everywhere in JS now. Thanks!
End of conversation
New conversation -
-
-
@DaveVoyles It's all design time readability. R# tells me to use var. Therefor, I use var. -
@firebellys Same here, that's why I started using var as well. Carried over from javaScript. R# is my saviour
End of conversation
New conversation -
-
-
@VicenteCartas gracias
-
@DaveVoyles @VicenteCartas : 12 less characters of typing... - Show replies
New conversation -
Loading seems to be taking a while.
Twitter may be over capacity or experiencing a momentary hiccup. Try again or visit Twitter Status for more information.