Rusty 🦀 Femboy 🏳️🌈 to Programmer Humor@lemmy.mlEnglish · 6 hours agoI love Rustimagemessage-square31fedilinkarrow-up1110
arrow-up1110imageI love RustRusty 🦀 Femboy 🏳️🌈 to Programmer Humor@lemmy.mlEnglish · 6 hours agomessage-square31fedilink
minus-squarecopygirllinkfedilinkEnglisharrow-up2·3 hours agoThen 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);
Then you should also override
Equals(object)
,GetHashCode
, and implementIEquatable<T>
.Thankfully a lot of the usual boilerplate code can be avoided using a
record
class or struct: