I have an immutable class with only immutable properties. Strings are immutable so why I have to mark string field as readonly or use "init" in that class?
public class ImmutableType{ public readonly string LastName { get; }}
I have an immutable class with only immutable properties. Strings are immutable so why I have to mark string field as readonly or use "init" in that class?
public class ImmutableType{ public readonly string LastName { get; }}