|
-
Jun 10th, 2012, 05:34 PM
#1
[RESOLVED] Store Objects with Key in some sort of Collection/Dictionary
I need to Store Objects with Key like:
Key: <Fontname & FontSize> / Object: <Font Object>
Example content:
Code:
ArialRegular8 | <Corresponding Font Object>
ImpactItalic10 | <Corresponding Font Object>
TimesRomanRegular12 | <Corresponding Font Object>
These font types come from an external library, the real type is DocumentFont, I prefer not to store just values and recreate the font object later, so I need to store the object, and i want to be able to call Contains() later without looping.
I see some possible solutions in the help, like for example Dictionary (of T Key, T Value), is this the best option? Also, to be able to call Contains(), i will have to overload function Contains() using an Interface or this is already built-in in some Collections / Dictionaries when using a String as Key?
Thanks!
Last edited by jcis; Jun 10th, 2012 at 05:44 PM.
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|