Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Detect if an index is part of a collection
Message
From
10/01/2013 02:09:15
 
 
To
09/01/2013 15:48:31
General information
Forum:
ASP.NET
Category:
Coding, syntax and commands
Environment versions
Environment:
VB 9.0
OS:
Windows 7
Network:
Windows 2003 Server
Database:
MS SQL Server
Application:
Web
Miscellaneous
Thread ID:
01561962
Message ID:
01562008
Views:
45
>What is the easiest way to detect if an index is part of a collection? I have this oSearch collection. Before doing oSearch.Remove(1), I would like to verify if that key exist first.

Rob gave the answer but you *might* get by just by checking the Remove() return value. This will be false if the item was not found - but also false if the Remove() failed for some other reason (which is the possible downside)
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform