1
There are differences in performance of explicitly declared variables?
List<int> lista = new List<int>();
And implicitly stated?
var lista = new List<int>();
1
There are differences in performance of explicitly declared variables?
List<int> lista = new List<int>();
And implicitly stated?
var lista = new List<int>();
Browser other questions tagged c# vb.net variables performance
You are not signed in. Login or sign up in order to post.
Related: http://answall.com/questions/47383/quando-usar-var-em-c, although there is much controversy on the subject, and I prefer explicitly ...
– novic
Don’t get me wrong @viniciusbrasil on the duplicate, although I might even let others have a say.
– novic
There is no gain or loss of performance in using the
var
because the types of variables declared byvar
are defined at runtime, i.e.var v = 10;
is the same asint v = 10;
and the Assembly code will be the same.– gato