(Formerly known as ListBoxGetNumItems, which is now obsolete)
readonly int ListBox.ItemCount
Gets the number of items in the specified listbox. Valid item indexes
range from 0 to (numItems - 1).
This property is read-only. To change the item count, use the AddItem and RemoveItem methods.
Example:
int saves = lstSaveGames.ItemCount;
will pass the number of saved games to the int saves.
See Also: ListBox.Items
|