I need to know how to override the Add-method of a certain Dictionary in a certain static class. Any suggestions?
If it matters, the dictionary looks like this:
In some scenarios, where TKey
is a property of TValue
, you may want to consider using KeyedCollectionInsertItem
, SetItem
, RemoveItem
, and ClearItems
.
It uses a dictionary internally (unless specified otherwise via the threshold constructor parameter), but also manages a collection.
I Haven't benchmarked or compared performance, there might be a performance difference so use carefully.
Consider voting on this feature suggestion on the .NET Core repo.