I created a code wherein when i select an item in a list box, the info about the item gets displayed in a text box. I also have move up and down buttons to move the contents of the list up and down and delete button to delete the selected item. Now when i click on the item the info is getting displayed in the text box but if i click on move up, down or delete button for the same item then exception is thrown Object reference not set to an instance of an object. The line that throws this exception is when i am creating a new object of ClassName in the code below:I created a code wherein when i select an item