I have a List<List<string>>
representing a grid of rows and columns (the count of each is dynamic).
I need to iterate over the items and display all possible combinations in one direction.
If I have the following items, for example:
var items = new List<List<string>>
{
new List<string> {"A", "B", "C", "D"},
new List<string> {"E", "F", "G", "H"},
new List<string> {"I", "J", "K", "L"},
};
The output should be :
---> *ABCD-ABCH-ABCL-ABGD-ABGH-ABGL-ABKD-ABKH-ABKL-........... IJKL*.
How can I iterate over the list to achieve this result?