Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Collection class that can index by a string variable
Message
From
28/07/2008 02:24:56
 
 
To
27/07/2008 21:38:06
Mike Cole
Yellow Lab Technologies
Stanley, Iowa, United States
General information
Forum:
ASP.NET
Category:
Class design
Environment versions
Environment:
VB 9.0
Miscellaneous
Thread ID:
01334402
Message ID:
01334434
Views:
7
>I am creating a collection class that holds file history. I am going to want to search this by file name often, so I want that to be as efficient as possible. What is the best way of doing this? I'm guessing I want to somehow utilize the IDictionary interface, but I'm not really sure how.
>
>Thanks!

I would use a generic dictionary
http://msdn.microsoft.com/en-us/library/xfhwa508.aspx look at TryGetValue in the code sample
http://msdn.microsoft.com/en-us/library/3eayzh46.aspx

You can use TryGetValue to find out whether a Filename is already in http://msdn.microsoft.com/en-us/library/bb347013.aspx

I had an example ready - but I cannot post it since the angle brackets are not allowed between PRE and /PRE
Gregory
Previous
Reply
Map
View

Click here to load this message in the networking platform