C#C
C#9mo ago
Faker

✅ Is there a difference when we use { get; init; } vs { get; } ?

C#
public record Person
{
    public required string FirstName { get; init; }
    public required string LastName { get; init; }
};


Hello guys, if I omit the init keyword here, would it make a difference? From what I've understood with or without the init keyword, we would still be able to "modify" the object during instantiation, no?
Was this page helpful?