My goal is simple, I am trying to generate a list of all possible combinations for a product in a database.
So for example; the product options are as follows
- Product Option: Color / Values: Red, Green, Blue
- Product Option: Size/ Values: Small, Med, Large, XL
- Product Option: Style / Values: Men, Women
I want to be able to auto generate every single combination of all 3:
Small, Red, Mens
Small, Green, Mens
Small, Blue, Mens
etc
I need the function to work whether I pass 2,3,4 or 5 arrays into it.
I've done quite a bit of research and came across the following articles but have been unable to accomplish my goal.
The articles I found are as follows:
- How to Generate Combinations of Elements of a List<T> in .NET 4.0
- vb .net permutation of string. permutation or combination?