I am trying to use the following code from COPL and i get an Error Type or namespace Combinations not found. Can any one Please help me with this.I am unable find a assembly reference or a namespace associated.
char[] inputSet = { 'A', 'B', 'C', 'D' };
Combinations<char> combinations = new Combinations<char>(inputSet, 3);
string cformat = "Combinations of {{A B C D}} choose 3: size = {0}";
Console.WriteLine(String.Format(cformat, combinations.Count));
foreach (IList<char> c in combinations)
{
Console.WriteLine(String.Format("{{{0} {1} {2}}}", c[0], c[1], c[2]));
}
The code is copied/pasted from this site: http://www.codeproject.com/Articles/26050/Permutations-Combinations-and-Variations-using-C-G
It is a test example of how to use one of the classes in an assembly, for which the code is also provided (follow the ‘Download’ link).
In order to make the test code work, you need to download their code, build it, and put a reference to the generated assembly into your own project.