Note that the first and the last approach (everything stated explicitly) were the only ones available in early versions of C#, so part of it is tradition / old habits. Type inference (var) and the shorthand were added later on; they are useful for keeping the code clean and concise. Type inference also serves to support certain features like anonymous types (where the type name is only known to the compiler).
↧