hi..i finish my intersection. Now i need to convert the output in the array.
Now, my output is in hashset. i need to convert back to array.
my output now is like this
2
1
2
1
3
2
1
3
4
And now, i wan them to become like this
2 1
2 1 3
2 1 3 4
....
how to make my output become like this?? hope someone can help me..
for (int i = 0; i < myArray1.Count; i++)
{
foreach (string t in myArray1[i].ToString().Split(' '))
{
//ItemKey.AppendText(t);
hs3.Add(t);
}
var clone = new HashSet<string>(hs2);
hs2.IntersectWith(hs3);
foreach (string y in hs2)
{
ItemKey.AppendText(y);
}
hs2 = clone;
hs3.Clear();
}