Hashtable/Dictionary but with key composed of multiple values?

Posted by MC on Stack Overflow See other posts from Stack Overflow or by MC
Published on 2010-03-02T21:10:10Z Indexed on 2010/03/21 20:31 UTC
Read the original article Hit count: 298

Filed under:
|
|

Lets say I have an object that has stringProp1, stringProp2. I wish to store each combination of stringProp1, stringProp2 in a Dictionary. Initially I was storing the key as key = stringProp1+stringProp2 but this can actually cause a bug depending on the 2 values. Is the best solution for this problem to create a custom dictionary class or is there a better way using built-in .NET classes?

© Stack Overflow or respective owner

Related posts about .NET

Related posts about dictionary