(1): 4
(2): 4
(1 2): 3
(3): 4
(1 3): 3
(2 3): 3
(1 2 3): 2
Above are show my sortedList.
may i know how to extract the double itemset and store in another new sortedList?
my expected output in my new sortedList are:
(1 2): 3
(1 3): 3
(2 3): 3
(1 2 3): 2
below are shown the coding for my sortedList1:
foreach (String sort in lbCombinations.Items)
{
if (!(sortList.ContainsKey(sort)))
{
sortList.Add(sort, 1);
}
else
{
int Count = (int)sortList[sort];
sortList[sort] = Count + 1;
}
}
IDictionaryEnumerator enumerator = sortList.GetEnumerator();
richTextBox1.Clear();
while (enumerator.MoveNext())
{
richTextBox1.AppendText("(" + enumerator.Key.ToString() + "): " + " " + enumerator.Value.ToString() + "\n");
}
hope anyone can help me..
Loading

Suthish NairRank #92 · 22.8K reputationPosted Apr 4, 2011, 10:59 AM EDT
Sam HobbsRank #108 · 20.5K reputationPosted Apr 4, 2011, 2:13 PM EDT
Sam HobbsRank #108 · 20.5K reputationPosted Apr 4, 2011, 2:25 PM EDT
y s62 reputationPosted Apr 5, 2011, 12:56 AM EDT
Sam HobbsRank #108 · 20.5K reputationPosted Apr 5, 2011, 1:05 AM EDT
y s62 reputationPosted Apr 5, 2011, 1:11 AM EDT
foreach (String sort in lbCombinations.Items)
{
if (!(sortList.ContainsKey(sort)))
{
sortList.Add(sort, 1);
}
else
{
int Count = (int)sortList[sort];
sortList[sort] = Count + 1;
}
}
IDictionaryEnumerator enumerator = sortList.GetEnumerator();
richTextBox1.Clear();
while (enumerator.MoveNext())
{
richTextBox1.AppendText("(" + enumerator.Key.ToString() + "): " + " " + enumerator.Value.ToString() + "\n");
}