Checking a list

  • Thread starter Thread starter pucksassasin
  • Start date Start date
P

pucksassasin

I dont want to go into too much detail about my problem so to put it
simply- I need my program to check a list of values to see if a given
value is on the list. Its needs to be able to do this quickly without
slowing the computer down and do so many times succesively.

Any help would be greatly appreciated.
 
Granted I'm must shooting from the hip but I'd suggest setting flag bits and
if you have lots of values, sparse arrays. Other than that binary searches
come to mind and possibly hash trees.
 
Im just getting started with visual basic, do you think you could give
me more laymans terms if possibe?
 
I think this might be in response to my response...

You didn't want to give any details... it's hard to answer with specifics
when nobody knows what you want to do.

pucksassasin said:
Im just getting started with visual basic, do you think you could give
me more laymans terms if possibe?
 
If your just getting started then a hash table, Array or an ArrayList
should be fine.

HashTable.Add
HashTable.Contains

or

ArrayList.Add
ArrayList.Contains
ArrayList.IndexOf


Check out System.Collections in the docs as per your requirements.
CodeProject.Com has some pretty good code samples on this sort of
thing but it depends entirely on ur requirements.


hth
Richard
 
Back
Top