IntelliTect / IntelliTect/CodingGuidelines
Document appropriate implementation of `GetHashCode`.
Aperta
documentation
- Lingua principale
- C#
- Stelle
- 12
- Fork
- 16
- Merge medio
- 2m
- PR unite (30g)
- 7
Descrizione
VS and Rider both flag warnings when you use a property in a `GetHashCode` implementation that is not read-only, however, I recently encountered an issue where one of the properties was virtual. This allowed the property to change in a derived class and alter the base class hash code leading to a failed dictionary lookup.
Solution: flag as warning when virtual member is used in `GetHashCode`
Guida per i contributori
Apri la guida per i contributori
Valutazione
Questa issue non è ancora stata valutata.