I've got an ArrayList that has been populated with objects defined in our business logic, using data returned from a SQL Stored Procedure. The app I'm working in is developed in VB.NET 2.0 (yes, I know. :) ).
I'm trying to figure out how to search through that ArrayList for a specific substring of characters in one "field" from the objects in the ArrayList, return the index of that item, and then remove it from the ArrayList.
I was trying something like this:
For i As Integer = 0 To oAcc.FundList.Count - 1
If oAcc.FundList.Item(i).OptionCode.ToString().Substring(0, 2) = "CD" Then
Where oAcc.FundList() is my ArrayList and OptionCode is one of the fields in the object contained in oAcc.FundList().
The problem I'm getting is that nothing is being returned, and I verified that there should be something returned based on the data from the Stored Procedure.
Where am I going wrong?
Changing the datatype of the Object returning the ArrayList is, unfortunately, not an option here.