Warning: file_get_contents(/data/phpspider/zhask/data//catemap/2/csharp/276.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181

Warning: file_get_contents(/data/phpspider/zhask/data//catemap/2/tensorflow/5.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
主构造函数未在C#6.0中编译_C#_C# 6.0_Primary Constructor - Fatal编程技术网

主构造函数未在C#6.0中编译

主构造函数未在C#6.0中编译,c#,c#-6.0,primary-constructor,C#,C# 6.0,Primary Constructor,我试图在C#6.0中编写一个主构造函数新特性的简单示例,但我无法编译它。 我已将语言版本更改为c#6.0,但它仍然无法工作 如何使其编译 我试图在C#6.0中编写一个主构造函数新特性的简单示例,但我无法编译它。我已将语言版本更改为c#6.0,但它仍然无法工作 该功能已被删除。谢谢,我不知道。你知道原因是什么吗?@ehh: public class Person (string fName, string lName) { public string FName { get; priva

我试图在C#6.0中编写一个主构造函数新特性的简单示例,但我无法编译它。 我已将语言版本更改为c#6.0,但它仍然无法工作

如何使其编译

我试图在C#6.0中编写一个主构造函数新特性的简单示例,但我无法编译它。我已将语言版本更改为c#6.0,但它仍然无法工作


该功能已被删除。

谢谢,我不知道。你知道原因是什么吗?@ehh:
public class Person (string fName, string lName)
{
    public string FName { get; private set; } = fName;
    public string LName { get; private set; } = lName;
}