i have a problem about compare arrayList and sortedlist.
my arrayList are shown below:
1 2
1 3
1 2
2 3
1 2 3
1 3
2 3
1 2 3
my another sortedeList are shown below:
(1): 4
(2): 4
(1 2): 3
(3): 4
(1 3): 3
(2 3): 3
(1 2 3): 2
Now my problem is i want to compare arrayList with sortedList . if the key are same, then will show value.
my expected output is :
1 2:3
1 3:3
1 2:3
2 3:3
1 2 3:2
1 3:3
2 3:3
1 2 3:2
my code are below:
Dictionary<string, double> sortList8 = new Dictionary<string, double>();
string sigh = "";
foreach (string ry in ang)
{
if (sortList2.ContainsKey(ry))
{
if (!sortList8.ContainsKey(ry))
{
sortList8.Add(ry, sortList[ry]);
sigh += String.Format("{0}:{1}\r\n", ry, sortList8[ry]);
}
}
}
richTextBox12.Clear();
richTextBox12.AppendText(sigh);
hope someone can help me..thx..