So, I have a list
which has an array
of strings
inside it, which (the arrays) are of different lengths.
foodmenu.menumethod();
var menugrid = foodmenu.menumethod();
// method for category lists
List<string> ingcategory = new List<string>();
for (int i = 0; i < menugrid.Count; i++)
{
ingcategory.Add(menugrid[i][]);
}
return ingcategory;
I want to be able to access all the elements in the string
array (which are the arrays inside the list) using a loop but a number of elements the string
array contains are not the same for each item in the list.
what the current menugrid
variable contains:
1 a b c d e f
2 a b
3 a b c d e f g h i j
4 a b c d e f h
5 a b c d
6 a b
7 a
currently, it only goes to one to seven and I have to manually place the second coordinate in the place of Y
due to me getting out of bound errors.