110,892
社区成员
发帖
与我相关
我的任务
分享
List<string> re = new List<string>();
string[] mailList = richTextBox1.Text.Split(new string[] { "\r\n" }, StringSplitOptions.RemoveEmptyEntries);
foreach (string item in mailList)
{
if (!richTextBox2.Text.Contains(item))
{
re.Add(item);
}
}
richTextBox1.Text = string.Join("\r\n", re.ToArray());
string[] str1 = richTextBox1.Text.Split(';');
string[] str2 = richTextBox2.Text.Split(';');
foreach (var a in str1)
{
bool b = ((IList)str2).Contains(a);
if (b)
{
richTextBox1.Text = richTextBox1.Text.Replace(a + ";", "");
richTextBox2.Text = richTextBox2.Text.Replace(a + ";", "");
}
}