I am trying to write a simple example of the Primary Constructor new feature in C# 6.0 but I am not able to compile it. I have changed the Language version to c# 6.0 but it still doesn't work.
public class Person (string fName, string lName)
{
public string FName { get; private set; } = fName;
public string LName { get; private set; } = lName;
}
How can I make it compile?
I am trying to write a simple example of the Primary Constructor new feature in C# 6.0 but I am not able to compile it. I have changed the Language version to c# 6.0 but it still doesn't work.
That feature was cut.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With