Rusty 🦀 Femboy 🏳️🌈 to Programmer [email protected]English • 2 months agoI love Rustlemmy.blahaj.zoneimagemessage-square62fedilinkarrow-up1310arrow-down124
arrow-up1286arrow-down1imageI love Rustlemmy.blahaj.zoneRusty 🦀 Femboy 🏳️🌈 to Programmer [email protected]English • 2 months agomessage-square62fedilink
minus-squarecopygirllinkfedilinkEnglish7•2 months 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-square@Gonzakolink1•2 months 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:public record Person(string Name, uint Age);
Oh well, It does show how little I do have to actually use that. It just hasn’t come up that much