Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Collection class that can index by a string variable
Message
De
28/07/2008 02:24:56
 
 
À
27/07/2008 21:38:06
Mike Cole
Yellow Lab Technologies
Stanley, Iowa, États-Unis
Information générale
Forum:
ASP.NET
Catégorie:
Conception classe
Versions des environnements
Environment:
VB 9.0
Divers
Thread ID:
01334402
Message ID:
01334434
Vues:
8
>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
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform