-
Is the C# version related in any way to the targeted framework?
-
How do I know which C# version I’m using?
-
How can I change the C# version I’m using?
-
What would I lose by going from .NET Framework 4 Client Profile to .NET Framework 2?
-
Does the selected framework restrict the range of OS versions the compiled program is able to run on?
Is the C# version related in any way to the targeted framework? How do
Share
1: well, broadly; later frameworks tend to ship with later compilers; .NET included C# 2, .NET 3.5 included C# 3, .NET 4.0 for C# 4 and .NET 4.5 for C# 5
2: you can have multiple versions on your computer, and this is in part dictated by which IDE you are using, or whether you are using the command line. At the command line,
cscwill tell you which version it is3: various options: use a different IDE; use a different version of csc from a different framework version; use csc with the
/langversiontoggle; set the “Language Version” in the “Advanced…” dialog in project properties (Visual Studio)4: LINQ, WCF, WPF, etc – lots of bugfixes and additional framework methods / tools
5: the computer must have the required framework, sure enough…