data structures - Multi-key dictionaries (of another kind) in C#? -


Building on

is a simple solution for multi-key dictionary where individually a key What can be used to identify the value?

Meaning

  Multiculturalism & lt; Vaccine1, vaccine2, tblue & gt; Foo; Foo.Add (key1, key2, value); MyValue = foo [key1]; // value == myValue foo.Remove (key2); MyValue = foo [key1]; // invalid, exception or redundant  

seems to extend a better implementation .

Multi-Chie Generic Dictionary Class for C #

MultiKeyDictionary is a C # class that provides Microsoft Generic Dictionary Object in .NET 2.0 and above is. This allows the developer to make general dictionaries and to refine the list of values ​​through two keys, which is provided by the Microsoft implementation of the generic dictionary & lt; ...> You can see my article on CodeProject (here), although this code is more up-to-date and bug-free.


Comments

Popular posts from this blog

c# - ListView onScroll event -

PHP - get image from byte array -

Linux Terminal Problem with Non-Canonical Terminal I/O app -