This question relates to C#.
Which is more efficient to use?
int number = 5;
or:
var number = 5;
My thinking is that there should be no difference in performance or memory during runtime, but compile time would be longer for option 2.
Is that correct? Are there any negative aspects of using var
?