title: Accessing Selected Index of ListBox
body: <p>I'm attempting to access a list called people and I'm matching up the index of the listitem selected to the index of my list so that I can print the surname of the person to a textbox.
  I have this code:</p>
  
  <pre><code>surnameTxtBox.Text = people[listBoxNames.SelectedItems[0].Index].Surname;
  </code></pre>
  
  <p>listBoxNames is the name of my ListBox but for some reason, visual studio tells me that there's no definition called index?</p>