if (listBox.SelectedIndex == (listBox.Items.Count - 1))
{
//...
}
Edit according to Thomas' suggestion in the comments:
You could add this code to the listBox' SelectedIndexChanged
event, to react on every selection change in the Listbox
:
listBox.SelectedIndexChanged += (s,e) =>
{
if (listBox.SelectedIndex == (listBox.Items.Count - 1))
{
//...
}
};