![]() |
#2
smofbao2007-10-01 18:09
|
private void Clear_Click(object sender, EventArgs e)
{
for (int i = 0; i < listBox2.Items.Count - 1; i++)
{
int n = listBox2.Items[i].ToString().LastIndexOf(".") + 1;
if (listBox2.Items[i].ToString().Substring(n, 3) != "mp3")
{
listBox2.Items.Remove(listBox2.Items[i]);
}
}
}
[此贴子已经被作者于2007-10-1 14:34:38编辑过]