myList = new List<string> {"Data1", "Data2", "Data3"};
This gives me an error while compiling it in Visual Studio 2005 as "A new expression requires () or [] after type".
I had a long search on this and finally I got the following solution.
Note those
{}
in error message, which are part of c# 3.0 syntax. This is not related to framework version, but to the version of the language. This is because of a different version of compiler was used.
It is compiled successfully, When I try to install the Microsoft following patch.
Happy Coding...
The article is amazing, thanks for the splendid post!keep it up..
ReplyDeleteonline fashion spot