I am trying to show the selected item in listview in a message box, so using the following code
private void lstMovie_SelectedIndexChanged(object sender, EventArgs e)
{ MessageBox.Show(lstMovie.FocusedItem.Text);}
it works fine for the first time but second time I try to select another item it throws an exception.
Object reference not set to an instance of an object.
Try this: