Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
Home
Discussion GroupsVB SyntaxEnterprise DevelopmentDatabase AccessControlsCOMWin APICrystal ReportDeploymentGeneralGeneral 2
Related Topics
VB.NET / ASP.NETMS SQL ServerMS AccessOther Database ProductsMore Topics ...

VB Forum / General 2 / July 2006



Tip: Looking for answers? Try searching our database.

Check collection for specific value

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
Ramon - 27 Jul 2006 17:32 GMT
Hello,

I need to check if a collection contains a specific value. Is there a way to
do this without looping?

Thanks!
Ramon.
Karl E. Peterson - 27 Jul 2006 18:55 GMT
> I need to check if a collection contains a specific value. Is there a
> way to do this without looping?

Ask for it, and error-trap.
--
Michael B. Johnson - 28 Jul 2006 15:43 GMT
>I need to check if a collection contains a specific value. Is there a way to
>do this without looping?

If it is a *value*, /not/ a key, then no - I know of no way to accomplish this
without looping through the values in the collection.

I hope this makes sense: If you built an array that indexed the values in the
collection and they were sorted in order of increasing value, then perhaps you
could use a binary search type probe.
_______________________
Michael B. Johnson
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2009 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.