In Visual Studio 2010, under “Advanced Build Settings” there is the following options for “Language Version”:
- default
- ISO-1
- ISO-2
- C# 3.0
Is there any advantage to compiling as C# 3.0, e.g. benchmark speed or stability?
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
The only time you should mess with this is if you are writing code in, say, VS 2010, but you intend that the code should compile on earlier compilers (VS 2005 or VS 2003). This will limit language features, such as LINQ (only in C# 3), iterator blocks (only in ISO-2 and above), etc.
Even then, it is not robust; there are some features that are pretty awkward to detect, and won’t be detected – some forms of generic type inference are impacted by this, so you should still test against an earlier compiler.
Unless you have a reason, use “default”. Normally, “default” is selected by, er, default. If it is selecting ISO-1, then you have changed your VS settings at some point.
There is not usually any speed difference associated with this – it is about the langauge that is available; however, I have not checked on some subtle cases, for example does the field-like-event implementation revert to the old-way if an earlier compiler selected.