I am refactoring a C # library using Dictionary<int, SomeInterface>the whole system. I need to change the key type from int to string and use it instead Dictionary<string, SomeInterface>, and I make dozens of changes. How to do it better, how to define a type in one place and use it everywhere, so if I need to change it later, can I change it in one place?
I have already added the GetKey () method to my interface.
Edit: The library is used in other DLLs, and I want to limit the possible changes to only one library. This is a nimble store, so we must be prepared for change.
source
share