How do I create multiple constructors for a record type in C#?
I created a record type like this:
public record Person(int Id, string FirstName, string LastName)
Now I want to introduce another constructor overload with no parameters, how can I do that? In a normal class I would do something like this:
public class Person
{
public int Id { get; set; }
public string FirstName { get; set; }
public string LastName { get; set; }
public Person()
{
}
public Person(int id, string firstName, string lastName)
{
Id = id;
FirstName = firstName;
LastName = lastName;
}
}