I just published an article on a generic
Trictionary class :
The article describes a
Trictionary class that is essentially a dictionary except that for each key there are two values, both of differing types. In many cases instead of doing this, the proper approach would most likely to use a
struct that would have those two types as members. But there may also be scenarios where you may want to avoid having to unnecessarily create a
struct just for this purpose. You could also use an anonymous type, but that’s really not so different in the sense you still end up having a new type in your assembly. Read the article for more info.
Note that the article was inspired by another
Trictionary article on Code Project submitted by Joe Enos.