listbox

T

Tony Johansson

Hello!

The property SelectedIndex return the index for the selected item in a
ListBox
If you have configured the ListBox so you can select more then one you use
property SelectedIndices to get a collection
of all selected indexes.

I can use SelectedItem to get the item that have been selected and use
SelectedItems to get the collection if more then one have been selected.

Now to my question why is not the property called SelectedIndexes to get the
collection for indexes. It's instead called
SelectedIndices. This is inconsistent

I mean it's very logical to use SelectedItem for a single item and
SelectedItems for a collection of items.

//Tony
 
J

Jeff Johnson

Now to my question why is not the property called SelectedIndexes to get
the collection for indexes. It's instead called
SelectedIndices. This is inconsistent

Not if you've ever studied Latin.

Extra language lesson-of-the-day: the plural of matrix is matrices.

Super extra lesson: The plural of stadium is stadia, but if you ever say "My
city is so big we have two major league baseball stadia," then people will
think you're a pretentious twit, and they'll be right. Basically, English is
wishy-washy on the use of technically-correct Latin plurals vs.
proper-English-sounding plurals. You can usually get away with either, and
you should be able to recognize both.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top