對於某些人我不想多說什麼.....我給出我剛寫的code...對於你的言辭我非常bs.
code如下:
System.Collections.ArrayList list = new System.Collections.ArrayList();
System.Collections.ArrayList wwwlist = new System.Collections.ArrayList();
private void button1_Click(object sender, EventArgs e)
{
int k = 0;
richTextBox1.Text = "www.baidu.com \r\n" +
"www. \r\n" +
"www. \r\n" +
"www. \r\n" +
"www. \r\n" +
"www.
string[] address = richTextBox1.Text.Split(' ');
wwwlist.AddRange(address);
for (int i = 0; i < address.Length; i++)
{
for (int j = i+1; j < address.Length; j++)
{
if (address[i].ToString().Trim().ToUpperInvariant() == address[j].ToString().Trim().ToUpperInvariant())
{
list.Add(j);
}
}
}
foreach(int b in list)
{
wwwlist.RemoveAt(b+k);
k--;
}
string [] checkaddress=(string [])wwwlist.ToArray(typeof(string));
richTextBox1.Text = string.Join(" ",checkaddress);
}
上面用到的有richtext控件和一個button控件.
另外對樓上的那位高手說一下,你真是太有才了!!!!!!!!!!!!!!!!!!!!!!