Remove HashSets over KeyValuePair
- Dominant language
- C#
- Stars
- 392
- Forks
- 128
- Avg merge
- 2d 10h
- Merged PRs (30d)
- 2
Description
From https://github.com/dotnet/runtime/issues/73048:
```
System.Private.CoreLib.dll!System.RuntimeType.GetFieldCandidates(string name, System.Reflection.BindingFlags bindingAttr, bool allowPrefixLookup) Unknown
System.Private.CoreLib.dll!System.RuntimeType.GetFields(System.Reflection.BindingFlags bindingAttr) Unknown
System.Private.CoreLib.dll!System.ValueType.Equals(object obj) Unknown
System.Private.CoreLib.dll!System.Collections.Generic.HashSet>.Remove(System.Collections.Generic.KeyValuePair item) Unknown
```
KeyValuePair doesn't implement GetHashCode/Equals, so we use reflection at runtime.
(I would stay away from records too because by properly ordering the checks one can get a better Equals than what Roslyn comes up with.)
Contributor guide
No contributing guide indexed for this repository
Assessment
This issue has not been assessed yet.