I have a List<string[]> called myList:
[0] "ABC" "Item Description Here" "Item Code Here"
[1] "DEF" "Item Description Here" "Item Code Here"
[3] etc, etc...
This is how I populated myList:
...
while (myReader.Read())
{
string[] row = new string[myInt];
for (int i = 0; i < myInt; i++)
{
row[i] = myReader[i].ToString();
}
myList.Add(row);
}
...
Now I need to search through myList and return a new List<string[]> called newList[] that contains 1 or more string[] where the first string matches a keyword (“ABC”, “DEF”, etc). How do I do that?
1) If you are searching only for one keyword:
2) If
checklistcontains same number of elements asmyList:3) If it can match any keyword from a checklist than: