Hi I'm new to C# and I'm starting to learn how to program I'm learning to program into the Visual Studio Microsoft Edition where I use the WindowsApplication instead of the Console. While trying to make this code, I encountered this command: Selected Index and Selected Item and I would like to know the difference between the two. I'm quite confused now with my code. The code I'm trying to do is adding and deleting text in the listbox.
Thanks for your help.
Additional question: in my code I have this line:
int listBoxSelectedItem = listBox1.SelectedIndex;
listBox1.Items.RemoveAt(listBox1.SelectedIndex);
I would like to understand this part: The first line, has a variable called " listBoxSelectedItem" with a type "int". The position of the item you selected will be store to the variable called "listBoxSelectedItem". Is that correct?
The second line is, the "listBox1.SelectedIndex" is the information that is being pass through to the method, "RemoveAt" Is my understanding here correct?
Thanks