I have a list of parameters with possible values :
// Definition of a parameter
public class prmMatrix
{
public string Name { get; set; }
public List<string> PossibleValues { get; set; }
public prmMatrix(string name, List<string> values)
{
Name = name;
PossibleValues = values;
}
}
//[...]
// List of params
List<prmMatrix> lstParams = new List<prmMatrix>();
lstParams.Add(new prmMatrix("Option A", new List<string>() { "Yes", "No" }));
lstParams.Add(new prmMatrix("Option B", new List<string>() { "Positive", "Negative" }));
I would like to have all the combinations of parameters possible, ex.:
[Option A:Yes][Option B:Positive]
[Option A:Yes][Option B:Negative]
[Option A:No][Option B:Positive]
[Option A:No][Option B:Negative]
What's the best way in C# ?