private void button1_Click(object sender, EventArgs e)
{
try
{
int i=listView1.SelectedItems.Count;
int j = listView1.SelectedIndices.Count;
for (int k = 0; i < listView1.SelectedItems.Count; k++)
{
listView1.Items[k].Remove();
}
}
catch (Exception ex)
{
MessageBox.Show(ex.Message);
}
}
当我从列表视图中选择值时,为什么它返回 count = 0 ?