I have an ArrayList that contains multiple String[] (String arrays).
Each String[] contains a key: name
What I want to do is sort the ArrayList based on the value of name.
Using Array.Sort did not work because it cannot compare String[]. How can I sort the ArrayList based on the value of name that is within the String[]?
In LINQ:
Normally it’s better to use a strong typed
List<String[]>instead of anArrayList. When you say key it sounds as if you want to have a list of strings for each unique key. Then aDictionary<String, String[]>would be the best choice.