-3
  1. Is the C# version related in any way to the targeted framework?

  2. How do I know which C# version I'm using?

  3. How can I change the C# version I'm using?

  4. What would I lose by going from .NET Framework 4 Client Profile to .NET Framework 2?

  5. Does the selected framework restrict the range of OS versions the compiled program is able to run on?

3
  • 3
    I very well feel that this would map to 5 different (duplicate) question here on SO ! ! Commented Aug 13, 2012 at 7:01
  • 1
    I searched before, but didn't really find the answers to my questions. Would you mind providing some links then? Commented Aug 13, 2012 at 7:06
  • About C# versions: stackoverflow.com/questions/688441/… Commented Aug 13, 2012 at 7:10

1 Answer 1

1

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, csc will tell you which version it is

3: various options: use a different IDE; use a different version of csc from a different framework version; use csc with the /langversion toggle; 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...

Sign up to request clarification or add additional context in comments.

Comments

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.