I have a list of arrays with 2 strings in each array. I need to check if the first string in each array matches a given number. I am assuming that linq is the best way to do this. I found a helpful SO answer here: Find an item in List by LINQ? It states to find an item in a list do this:
string result = myList.Single(s => s == search);
From the comments, I think I want to use SingleOrDefault. But how do I make it search the first item of each array in the list? Here is my list of arrays:
List<string[]> shipsLater = new List<string[]> {};
string[] itemArr = { item.pid, future };
shipsLater.Add(itemArr);