(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
y sPosted Apr 5, 2011, 5:11 AM
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");
}
Sam HobbsPosted Apr 5, 2011, 5:05 AM
y sPosted Apr 5, 2011, 4:56 AM
Sam HobbsPosted Apr 4, 2011, 6:25 PM
Sam HobbsPosted Apr 4, 2011, 6:13 PM
Suthish NairPosted Apr 4, 2011, 2:59 PM