This documentation is archived and is not being maintained.

ListBox.IntegerCollection Class

Represents a collection of integers in a ListBox.


Namespace:  System.Windows.Forms
Assembly:  System.Windows.Forms (in System.Windows.Forms.dll)

type IntegerCollection =  
        interface IList
        interface ICollection
        interface IEnumerable

The ListBox.IntegerCollection type exposes the following members.

Public methodListBox.IntegerCollectionInitializes a new instance of the ListBox.IntegerCollection class.

Public propertyCountGets the number of selected items in the ListBox.
Public propertyItemGets or sets the Item having the specified index.

Public methodAddAdds a unique integer to the collection in sorted order.
Public methodAddRange(Int32[])Adds an array of integers to the collection.
Public methodAddRange(ListBox.IntegerCollection)Adds the contents of an existing ListBox.IntegerCollection to another collection.
Public methodClearRemoves all integers from the ListBox.IntegerCollection.
Public methodContainsDetermines whether the specified integer is in the collection.
Public methodCopyToCopies the entire ListBox.IntegerCollection into an existing array of integers at a specified location within the array.
Public methodEquals(Object)Determines whether the specified Object is equal to the current Object. (Inherited from Object.)
Protected methodFinalizeAllows an object to try to free resources and perform other cleanup operations before it is reclaimed by garbage collection. (Inherited from Object.)
Public methodGetHashCodeServes as a hash function for a particular type. (Inherited from Object.)
Public methodGetTypeGets the Type of the current instance. (Inherited from Object.)
Public methodIndexOfRetrieves the index within the ListBox.IntegerCollection of the specified integer.
Protected methodMemberwiseCloneCreates a shallow copy of the current Object. (Inherited from Object.)
Public methodRemoveRemoves the specified integer from the ListBox.IntegerCollection.
Public methodRemoveAtRemoves the integer at the specified index from the ListBox.IntegerCollection.
Public methodToStringReturns a string that represents the current object. (Inherited from Object.)

Public Extension MethodAsParallelEnables parallelization of a query. (Defined by ParallelEnumerable.)
Public Extension MethodAsQueryableConverts an IEnumerable to an IQueryable. (Defined by Queryable.)
Public Extension MethodCast(TResult)Casts the elements of an IEnumerable to the specified type. (Defined by Enumerable.)
Public Extension MethodOfType(TResult)Filters the elements of an IEnumerable based on a specified type. (Defined by Enumerable.)

Explicit interface implemetationPrivate propertyICollection.IsSynchronizedInfrastructure. Gets a value indicating whether access to the collection is synchronized (thread safe).
Explicit interface implemetationPrivate propertyICollection.SyncRootInfrastructure. Gets an object that can be used to synchronize access to the collection of controls.
Explicit interface implemetationPrivate methodIEnumerable.GetEnumeratorRetrieves an enumeration of all the integers in the ListBox.IntegerCollection.
Explicit interface implemetationPrivate methodIList.AddInfrastructure. Adds a tab stop to the collection.
Explicit interface implemetationPrivate methodIList.ClearInfrastructure. Clears all the tab stops from the collection.
Explicit interface implemetationPrivate methodIList.ContainsInfrastructure. Determines whether the specified tab stop is in the collection.
Explicit interface implemetationPrivate methodIList.IndexOfInfrastructure. Returns the index of the specified tab stop in the collection.
Explicit interface implemetationPrivate methodIList.InsertInserts an item into the collection at a specified index.
Explicit interface implemetationPrivate propertyIList.IsFixedSizeInfrastructure. Gets a value indicating whether the collection has a fixed size.
Explicit interface implemetationPrivate propertyIList.IsReadOnlyGets a value indicating whether the collection is read-only.
Explicit interface implemetationPrivate propertyIList.ItemInfrastructure. Gets or sets the tab stop at the specified index.
Explicit interface implemetationPrivate methodIList.RemoveRemoves the first occurrence of an item from the collection.
Explicit interface implemetationPrivate methodIList.RemoveAtRemoves the item at a specified index.

ListBox.IntegerCollection is a sorted collection to which items are appended by using the Add and AddRange methods. Duplicate values are removed.

The ListBox.IntegerCollection is used mainly by the CustomTabOffsets property.

.NET Framework

Supported in: 4, 3.5, 3.0, 2.0

.NET Framework Client Profile

Supported in: 4, 3.5 SP1

Windows 7, Windows Vista SP1 or later, Windows XP SP3, Windows XP SP2 x64 Edition, Windows Server 2008 (Server Core not supported), Windows Server 2008 R2 (Server Core supported with SP1 or later), Windows Server 2003 SP2

The .NET Framework does not support all versions of every platform. For a list of the supported versions, see .NET Framework System Requirements.

Any public static (Shared in Visual Basic) members of this type are thread safe. Any instance members are not guaranteed to be thread safe.