Proper way to initialize a C# dictionary with values

= new Dictionary { {“csv”, XlFileFormat.xlCSV}, {“html”, XlFileFormat.xlHtml} }; There is a red line under new with the error: Feature ‘collection initilializer’ cannot be used because it is not part of the ISO-2 C# language specification What is going on here? I am using .NET version 2.

Read More