方法二:
private object GetSelectedItemFromListView(ListView listView)
{
return listView.SelectedItems[0];
}
方法一:
private object GetSelectedItemFromListView(ListView listView)
{
SelectedListViewItemCollection selListViewItemCol = listView.SelectedItems;
IEnumerator enumer = selListViewItemCol.GetEnumerator();
return enumer.Current();
}
foreach (ListViewItem item in listView1.Items)
{
if (item.Checked)
{
}
}
if( listview.SelectedItems!=null){
return listview.SelectedItems[0];
}