Question is in title. 3.0 or 4.0?
Asked
Active
Viewed 4,312 times
7
-
3.5 is the .NET Framework version, whereas, the C# versions range from 1,2,3,4 http://en.wikipedia.org/wiki/C_Sharp_(programming_language) – Inisheer Apr 13 '10 at 07:36
-
I know. But it does not affect my question. – Aen Sidhe Apr 13 '10 at 08:27
2 Answers
8
It will use the C# 4 compiler, so you can still use (some) C# 4 features.
If you want to restrict yourself to C# 3, click on the Advanced button in the project properties Build tab (bottom right) and you can choose the language version you want to use.
-
@Jon, if it uses the C# 4.0 compiler how it will interpret the `dynamic` keyword when targeting .NET 3.5? I suppose it will generate a compile error as the class is not defined? – Darin Dimitrov Apr 13 '10 at 07:35
-
1@Darin: I suspect it will give you an error saying that you can't use `dynamic` against .NET 3.5. Try it :) – Jon Skeet Apr 13 '10 at 07:37
-
1wish I could, currently at 58% downloading VS 2010 Ultimate :-) – Darin Dimitrov Apr 13 '10 at 07:38
-
Did I undestand you correctly: even if I restrict myself by a language version option, it'll be compiled by 4.0 compiler but with additional restrictions? – Aen Sidhe Apr 13 '10 at 08:25
-
1@Aen: Yes. This is like specifying the /langversion flag on the command line. – Jon Skeet Apr 13 '10 at 08:37
-3
Visual Studio 2010 will respect your target. If you set it to 3.5, it'll compile in 3.5.

Echiban
- 849
- 2
- 11
- 21