Which “C# Experimental language feature” is this?

前端 未结 3 1793
心在旅途
心在旅途 2021-01-12 02:31

In the example below, Resharper shows \"C# Experimental language feature\" tooltip on the first curly bracket. I\'ve checked the new features of C# 6.0 but didn\'t come acro

3条回答
  •  隐瞒了意图╮
    2021-01-12 03:19

    On November 12, 2014 Microsoft announced the release of Visual Studio 2015 on the day of Visual Studio Connect() from New York, USA where they announced many new features as well as enhancements with C# 6.0. So we should understand that a Primary Constructor is not applicable with C# 6.0 but we can do the same thing using Auto Implemented Properties Initializers.

    Basically a Primary Constructor is a feature of C# that was announced with Visual Studio 2014. But now it has been removed from Visual Studio 2015 Preview. So in C# 6.0 it's not possible to use a primary constructor.

提交回复
热议问题