public static void ClearListView(ListView list) { if (list.InvokeRequired) { var d = new ClearListViewDelegate(ClearListView); list.Invoke(d, new object[] { list }); } else { list.Items.Clear(); } }
public void clearListView() { if (this.InvokeRequired) { ClearListViewDelegate clvd = new ClearListViewDelegate(clearListView); this.Invoke(clvd); } else { imageListView1.Items.Clear(); } }