locked
Difference between C# 6.0 and C#7.0 and the IDE thereof RRS feed

  • Question

  • User-1635004321 posted

    I'm trying to understand how the new features C# newer version work.Actually when visual studio 2015 was launched it had new features like for instance NULL Condition operator ( ? ). when i worked using this and pushed the code to the guthub.all others who pulled this code and were using visual studio 2012 couldn't compile the code for the compiler complained about this operator.

    I have three questions regarding this.

    Question 1 is - does this mean its the new IDE in visual studio 2015 that recognises it i.e its IDE dependent ? IDE understands it and compiles it replacing it with appropriate code.isn't it the .NET framework feature ?

    Question 2 is - does this mean, if i use a different editor but the same .NET framework it won't work.

    Question 3 is - aren't newer features that come regularly with new versions of C# dependent on .NET framework ? if not ? where from does it get those feature ?

    please guide about this.how this actually works.

    Sunday, February 5, 2017 5:07 PM

All replies

  • User-782232518 posted

    Q1: Yes. VS2012 and below were too old to rely on .NET Framework 4.x shipped MSBuild and C# compiler, so they won't be able to support new things. New language features depend on new compiler, so it also binds to a certain VS release. VS 2013 and above ship with their dedicate MSBuild and C# support, so you still need to match the versions.

    Q2: It only matters which tooling is used (especially MSBuild and C# compiler), so "editor" is not a good term to be used.

    Q3: More and more C# language features only require the compiler upgrade. You can read more about Roslyn and C# language spec at GitHub, as Microsoft makes them public.

    Monday, February 6, 2017 6:41 AM