日期:2014-05-18 浏览次数:20803 次
private void listBox1_MouseClick(object sender, MouseEventArgs e) { MessageBox.Show(this.listBox1.SelectedItem.ToString()); }
------解决方案--------------------
private void listBox1_MouseClick(object sender, MouseEventArgs e) { if (listBox1.SelectedItem != null) { MessageBox.Show(this.listBox1.SelectedItem.ToString()); } }