T
Tim Royal
On my web site, i have a collection of items that a user could click on. I
originally had a dictionary that kept a key,item list, but now it's grown
more complicated as "new information about what the customer is selling" has
come in.
Long story short, I was looking for a way to have a dictionary use a key
that I defined.
example:
instead of Dictionary<string, object>,
I wanted to have:
Dictionary<customTypeIDefine, object> testDict();
I was able to create a dictionary and add items in by using:
testDict.add(new customTypeIDefine("boo", Style.Left), new
MySpecialObject()),
but it doesn't seem to be able to lookup the values and find them. I'm
guessing it's because somewhere I need to define or implement some
interfaces for the TKey type I've defined.
Is there an article/reference/list of what I need to implement for a TKey to
be usable in this situation?
Thanks for any assistance.
Tim Royal
originally had a dictionary that kept a key,item list, but now it's grown
more complicated as "new information about what the customer is selling" has
come in.
Long story short, I was looking for a way to have a dictionary use a key
that I defined.
example:
instead of Dictionary<string, object>,
I wanted to have:
Dictionary<customTypeIDefine, object> testDict();
I was able to create a dictionary and add items in by using:
testDict.add(new customTypeIDefine("boo", Style.Left), new
MySpecialObject()),
but it doesn't seem to be able to lookup the values and find them. I'm
guessing it's because somewhere I need to define or implement some
interfaces for the TKey type I've defined.
Is there an article/reference/list of what I need to implement for a TKey to
be usable in this situation?
Thanks for any assistance.
Tim Royal