πŸ’¬ Reply by Gonzako

2024-11-15 πŸ”„ programmerhumor ┃ RE: rustyfemboy

I’ve only had to implement equality in C# but that didn’t seem that hard of a problem. you just expand the operator = function

Gonzako

rustyfemboy

πŸ”„ programmerhumor

πŸ’¬ Replies

2024-11-15 copygirl ┃ 1πŸ’¬

Then you should also override Equals(object), GetHashCode, and implement IEquatable.
[…]
Thankfully a lot of the usual boilerplate code can be avoided using a record class or struct:
[…]

2024-11-15 porous_grey_matter ┃ 2πŸ’¬

It’s not hard, just if you’re doing it for a struct with a lot of fields it’s a lot of boilerplate

────

View parent post

View thread

────

πŸ“‘ Local feed

πŸ•οΈ Communities

πŸ”₯ Hashtags

πŸ”Ž Search posts

πŸ”‘ Sign in

πŸ“Š Status

πŸ›Ÿ Help