Link to home
Start Free TrialLog in
Avatar of Jimbo99999
Jimbo99999Flag for United States of America

asked on

VB.Net - Find String in Array

Good Day Experts!

I think what I want to do is possible but I am struggling how to get started and I hope you can point me in the right direction.

I have a Case statement that I would like to use a search of  arrayLists to determine which block of Case statement to run.
I have 3 different ArrayLists pre-populated.  I have a DataReader of Accounts  that I need to loop through and determine which block of code to run.  So if the Account is in ArrayList1 run this code, if Account is in ArrayList2 run this code etc...
The Account won't be in multiple ArrayLists.

Case "Account in ArrayList1 = yes"
     ....................

Case "Account in ArrayList2 = yes"
     ...................

Case "Account in ArrayList3 = yes"
     ...................


I have been searching the net for some time and am having a bit of trouble getting started.  Can you help?

Thanks,
jimbo99999
ASKER CERTIFIED SOLUTION
Avatar of Dustin Saunders
Dustin Saunders
Flag of United States of America image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of Jimbo99999

ASKER

Thank you. I have integrated .Contains and running the code now.
Exactly what I was looking for. It works great!

Thanks,
jimbo99999