Rusty 🦀 Femboy 🏳️🌈 to Programmer Humor@lemmy.mlEnglish · 9 hours agoI love Rustimagemessage-square37fedilinkarrow-up1140
arrow-up1140imageI love RustRusty 🦀 Femboy 🏳️🌈 to Programmer Humor@lemmy.mlEnglish · 9 hours agomessage-square37fedilink
minus-squarecopygirllinkfedilinkEnglisharrow-up4·5 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);
minus-squareGonzako@lemmy.worldlinkfedilinkarrow-up1·1 hour agoOh well, It does show how little I do have to actually use that. It just hasn’t come up that much
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:Oh well, It does show how little I do have to actually use that. It just hasn’t come up that much