I'm kind of looking for a solution to this problem. Currently I have a product object. The object contains a list of attribute, inputted by a user, so I have no way to know beforehand how many attributes the user is going to enter.
Lets assume we have 2 lists:
Attribute List: Color Size
Value List:
Color: Red Blue
Size: Small Medium Large
I want to iterate through the the attribute list and value list to create every non-duplicate pair possible so that it would go like this:
[Red,Small][Red,Medium][Red,Large][Blue,Small][Blue,Medium][Blue,Large]
Using C#, I'm stuck at figuring how how to pair them using loops for dynamic list number (my implementation only counted for 2 attribute lists, what if the user input 3 or 4 list?)