C Sharp (programming language): Difference between revisions

Content deleted Content added
m show "syntactic sugar"
Line 298:
=== Local variable type inference ===
Local variable [[type inference]]: <source lang="csharp">var x = new Dictionary<string, List<float>>();</source>
is interchangeable with <source lang="csharp">Dictionary<string, List<float>> x = new Dictionary<string, List<float>>();</source>
More than just [[syntactic sugar]], this feature is required for the declaration of anonymous typed variables. Also it simplifies refactoring.