hi..i am using hashset to to my intersection.But still cannot intersect the two hashset successfully.I need some help from you guys..
Now,
my first hashset include the number in string
2
1
3
4
5
my second hashset include the number in string (in line)
1 2
1 2 3
2 3
2 3 4
..........(many lines)
how to intersect this two hashset?
HashSet<string>hs1 = new HashSet<string>();
var g = from k in sItem.Keys
orderby sItem[k] descending
select k;
foreach (var k in g)
{
//display3 += k + ":" + sItem[k] + "\r\n";
SingleSupport.AppendText(k + ":" + sItem[k] + "\r\n");
hs1.Add(k.ToString());
}
HashSet<string> hs2 = new HashSet<string>();
//key and values for comabination
IDictionaryEnumerator et = itemS.GetEnumerator();
while (et.MoveNext())
{
KeyitemS.AppendText(et.Key.ToString() + ":" + et.Value.ToString()+"\r\n");
// MessageBox.Show(et.Key.ToString() + ":" + et.Value.ToString() + "\r\n");
hs2.Add(et.Key.ToString());
}
here is my coding.Hope someone can help me....thank you.