[Solved] IndexOf and Contains ArrayList C#


I am not sure what exactly you want to achieve as you are not explaining it very clearly. But if you need to search in arrays that are added in a list and you do not mind using linq to make it a bit easier the following will compile and give you the outcome wanted

 List<string[]> list = new List<string[]>();
  string[] str1 = new string[] { "0", "Chicago", "Chicago", "Week 2" };
  string[] str2 = new string[] { "1", "Detroit", "Baltimore", "Week 3" };
  list.Add(str1);
  list.Add(str2);

  var t = list.Where(l => l.Contains("Chicago") || l.Contains("Week2")).ToList();

solved IndexOf and Contains ArrayList C#