private void listView1_SelectedIndexChanged(object sender, EventArgs e)
{
ListView lv = (ListView)sender;
textBox2.Text = lv.FocusedItem.SubItems[3].Text;
textBox3.Text = lv.FocusedItem.SubItems[0].Text;
}
I think the above code is not secure and this will fire Null Reference Error on updating listview Items by other forms so how to secure it that it will stay protected against Null Reference Error?.
You should check if there are 4 subitems in focused item, something like this :