• copygirl
    link
    fedilink
    English
    arrow-up
    2
    ·
    3 hours ago

    Then you should also override Equals(object), GetHashCode, and implement IEquatable<T>.

    Thankfully a lot of the usual boilerplate code can be avoided using a record class or struct:

    public record Person(string Name, uint Age);