What would the difference in these two code snippets? Both compiles fine with .NET Core 6
.
public class Person
{
public string FirstName { get; init; }
public Person(string firstName)
{
FirstName = firstname;
}
}
vs
public class Person
{
public string FirstName { get; }
public Person(string firstName)
{
FirstName = firstname;
}
}