private List<int> GetMultiClassList(params string[] classNames)
{
List<int> words = new List<int>();
List<int> firstClass = this.Classes[classNames[0]];
for (int i = 0; i < firstClass.Count; i++) // loop through every item of the first class
{
int matchCount = 0;
for (int j = 1; j < classNames.Length; j++) // loop through all the other classes
{
List<int> currentClass = this.Classes[classNames[j]];
for (int k = 0; k < currentClass.Count; k++) // search their contents and match them up
{
if (firstClass[i] == currentClass[k])
{
matchCount++;
}
}
}
if (matchCount == classNames.Length - 1)
{
words.Add(firstClass[i]);
}
}
return words;
}