Mögliche Duplizieren:
What's the point of the var keyword?
What advantages does using var have over the explicit type in C#?Warum var anstelle des Klassennamens verwenden?
ich immer andere Leute sehen, produzieren Code wie:
var smtp = new SmtpClient();
Aber warum var
statt SmtpClient
in diesem Fall verwenden? Ich IMMER Verwendung
SmtpClient smtp = new SmtpClient();
Ist var
effizienter? Warum anstelle des eigentlichen Variablentyps var
verwenden? Fehle ich etwas?
mögliche Duplikate von [Welche Vorteile hat die Verwendung von Var über den expliziten Typ in C#?] (Http://stackoverflow.com/questions/3425966/what-advantages-does-using-var-have-over-the- explicit-type-in-c) Siehe auch [C# 'var' vs. spezifische Typ-Performance] (http://stackoverflow.com/questions/356846/c-sharp-var-vs-specific-type-performance) –
@MattBall Lol und ** DAS ist ein Duplikat zu –