Class ListBox.BaseObjectCollection
Represents a collection of objects that can be used with a ListBox control.
public class ListBox.BaseObjectCollection : ListBox.ObjectCollection, IList, ICollection, IEnumerable
- Inheritance
-
ListBox.BaseObjectCollection
- Implements
Remarks
This collection provides functionality for managing objects in a ListBox control, including adding, removing, and accessing items. It inherits from ListBox.ObjectCollection and overrides its members to provide specific behavior for object management.
Constructors
- BaseObjectCollection(ListBox)
Initializes a new instance of the ListBox.BaseObjectCollection class.
Properties
- Count
Gets the number of elements contained in the ICollection.
- IsFixedSize
Gets a value indicating whether the IList has a fixed size.
- IsReadOnly
Gets a value indicating whether the IList is read-only.
- IsSynchronized
Gets a value indicating whether access to the ICollection is synchronized (thread safe).
- this[int]
Gets or sets the element at the specified index.
- SyncRoot
Gets an object that can be used to synchronize access to the ICollection.
Methods
- Add(object?)
Adds an item to the IList.
- Contains(object?)
Determines whether the IList contains a specific value.
- CopyTo(Array, int)
Copies the elements of the ICollection to an Array, starting at a particular Array index.
- GetEnumerator()
Returns an enumerator that iterates through a collection.
- IndexOf(object?)
Determines the index of a specific item in the IList.
- Insert(int, object?)
Inserts an item to the IList at the specified index.
- Remove(object?)
Removes the first occurrence of a specific object from the IList.
- RemoveAt(int)
Removes the IList item at the specified index.