Note: I don't want to use records.
In the newer versions of C#, Is there any way to set properties in constructor definition like other languages such as Dart or Typescript?
Example :
public class Person
{
public string FirstName {get;set;}
public string LastName {get;set;}
}
In constructor instead of :
public Person(string firstName, string lastName){
FirstName = firstName;
LastName = lastName;
}
Is there any feature like the following?
public Person(string this.FirstName, string this.LastName){
}