Thank you for the help
here is my solution
{
txtLeftResult.Text = "";
txtRightResult.Text = "";
List<string> leftCollection = new List<string>();
leftCollection.AddRange(txtLeftCollection.Text.Split(new string[] { "\r\n" }, StringSplitOptions.None));
List<string> rightCollection = new List<string>();
rightCollection.AddRange(txtRightCollection.Text.Split(new string[] { "\r\n" }, StringSplitOptions.None));
foreach (string row in leftCollection)
{
if (!rightCollection.Contains(row))
{
txtLeftResult.Text = txtLeftResult.Text + "\r\n" + row;
}
}
if (txtLeftResult.Text.Length > 0)
{
txtLeftResult.Text = txtLeftResult.Text.Remove(0, 2);
}
foreach (string row in rightCollection)
{
if (!leftCollection.Contains(row))
{
txtRightResult.Text = txtRightResult.Text + "\r\n" + row;
}
}
if (txtRightResult.Text.Length > 0)
{
txtRightResult.Text = txtRightResult.Text.Remove(0, 2);
}
}</string></string></string></string>