ListBox.IntegerCollection ListBox.IntegerCollection ListBox.IntegerCollection ListBox.IntegerCollection Class

定义

表示 ListBox 中整数的集合。Represents a collection of integers in a ListBox.

public: ref class ListBox::IntegerCollection : System::Collections::IList
public class ListBox.IntegerCollection : System.Collections.IList
type ListBox.IntegerCollection = class
    interface IList
    interface ICollection
    interface IEnumerable
Public Class ListBox.IntegerCollection
Implements IList
继承
ListBox.IntegerCollectionListBox.IntegerCollectionListBox.IntegerCollectionListBox.IntegerCollection
实现

注解

ListBox.IntegerCollection是使用AddAddRange方法追加项的已排序集合。ListBox.IntegerCollection is a sorted collection to which items are appended by using the Add and AddRange methods. 删除重复值。Duplicate values are removed.

ListBox.IntegerCollection 主要CustomTabOffsets由属性使用。The ListBox.IntegerCollection is used mainly by the CustomTabOffsets property.

构造函数

ListBox.IntegerCollection(ListBox) ListBox.IntegerCollection(ListBox) ListBox.IntegerCollection(ListBox) ListBox.IntegerCollection(ListBox)

初始化 ListBox.IntegerCollection 类的新实例。Initializes a new instance of the ListBox.IntegerCollection class.

属性

Count Count Count Count

获取 ListBox 中选择的项的数目。Gets the number of selected items in the ListBox.

Item[Int32] Item[Int32] Item[Int32] Item[Int32]

获取或设置具有指定索引的 Item[Int32]Gets or sets the Item[Int32] having the specified index.

方法

Add(Int32) Add(Int32) Add(Int32) Add(Int32)

按照排序顺序向集合添加一个唯一的整数。Adds a unique integer to the collection in sorted order.

AddRange(Int32[]) AddRange(Int32[]) AddRange(Int32[]) AddRange(Int32[])

向集合添加整数数组。Adds an array of integers to the collection.

AddRange(ListBox+IntegerCollection) AddRange(ListBox+IntegerCollection) AddRange(ListBox+IntegerCollection) AddRange(ListBox+IntegerCollection)

将现有 ListBox.IntegerCollection 中的内容添加到另一集合。Adds the contents of an existing ListBox.IntegerCollection to another collection.

Clear() Clear() Clear() Clear()

ListBox.IntegerCollection 中移除所有整数。Removes all integers from the ListBox.IntegerCollection.

Contains(Int32) Contains(Int32) Contains(Int32) Contains(Int32)

确定指定的整数是否在集合中。Determines whether the specified integer is in the collection.

CopyTo(Array, Int32) CopyTo(Array, Int32) CopyTo(Array, Int32) CopyTo(Array, Int32)

将整个 ListBox.IntegerCollection 复制到现有整数数组的指定位置。Copies the entire ListBox.IntegerCollection into an existing array of integers at a specified location within the array.

Equals(Object) Equals(Object) Equals(Object) Equals(Object)

确定指定的对象是否等于当前对象。Determines whether the specified object is equal to the current object.

(Inherited from Object)
GetHashCode() GetHashCode() GetHashCode() GetHashCode()

作为默认哈希函数。Serves as the default hash function.

(Inherited from Object)
GetType() GetType() GetType() GetType()

获取当前实例的 TypeGets the Type of the current instance.

(Inherited from Object)
IndexOf(Int32) IndexOf(Int32) IndexOf(Int32) IndexOf(Int32)

检索指定的整数在 ListBox.IntegerCollection 中的索引。Retrieves the index within the ListBox.IntegerCollection of the specified integer.

MemberwiseClone() MemberwiseClone() MemberwiseClone() MemberwiseClone()

创建当前 Object 的浅表副本。Creates a shallow copy of the current Object.

(Inherited from Object)
Remove(Int32) Remove(Int32) Remove(Int32) Remove(Int32)

ListBox.IntegerCollection 中移除指定的整数。Removes the specified integer from the ListBox.IntegerCollection.

RemoveAt(Int32) RemoveAt(Int32) RemoveAt(Int32) RemoveAt(Int32)

ListBox.IntegerCollection 中移除指定索引处的整数。Removes the integer at the specified index from the ListBox.IntegerCollection.

ToString() ToString() ToString() ToString()

返回表示当前对象的字符串。Returns a string that represents the current object.

(Inherited from Object)

显式界面实现

ICollection.IsSynchronized ICollection.IsSynchronized ICollection.IsSynchronized ICollection.IsSynchronized

获取一个值,该值指示对集合的访问是否为同步的(线程安全)。Gets a value indicating whether access to the collection is synchronized (thread safe).

ICollection.SyncRoot ICollection.SyncRoot ICollection.SyncRoot ICollection.SyncRoot

获取可用于同步控件集合访问的对象。Gets an object that can be used to synchronize access to the collection of controls.

IEnumerable.GetEnumerator() IEnumerable.GetEnumerator() IEnumerable.GetEnumerator() IEnumerable.GetEnumerator()

检索 ListBox.IntegerCollection 中所有整数的枚举。Retrieves an enumeration of all the integers in the ListBox.IntegerCollection.

IList.Add(Object) IList.Add(Object) IList.Add(Object) IList.Add(Object)

将制表位添加到集合。Adds a tab stop to the collection.

IList.Clear() IList.Clear() IList.Clear() IList.Clear()

从集合中清除所有制表位。Clears all the tab stops from the collection.

IList.Contains(Object) IList.Contains(Object) IList.Contains(Object) IList.Contains(Object)

确定指定的制表位是否在集合中。Determines whether the specified tab stop is in the collection.

IList.IndexOf(Object) IList.IndexOf(Object) IList.IndexOf(Object) IList.IndexOf(Object)

返回集合中指定的制表位的索引。Returns the index of the specified tab stop in the collection.

IList.Insert(Int32, Object) IList.Insert(Int32, Object) IList.Insert(Int32, Object) IList.Insert(Int32, Object)

将某个项插入到集合中的指定索引处。Inserts an item into the collection at a specified index.

IList.IsFixedSize IList.IsFixedSize IList.IsFixedSize IList.IsFixedSize

获取一个值,该值指示集合是否具有固定大小。Gets a value indicating whether the collection has a fixed size.

IList.IsReadOnly IList.IsReadOnly IList.IsReadOnly IList.IsReadOnly

获取一个值,该值指示集合是否为只读。Gets a value indicating whether the collection is read-only.

IList.Item[Int32] IList.Item[Int32] IList.Item[Int32] IList.Item[Int32]

获取或设置指定索引位置的制表位。Gets or sets the tab stop at the specified index.

IList.Remove(Object) IList.Remove(Object) IList.Remove(Object) IList.Remove(Object)

从集合中移除某项的第一个匹配项。Removes the first occurrence of an item from the collection.

IList.RemoveAt(Int32) IList.RemoveAt(Int32) IList.RemoveAt(Int32) IList.RemoveAt(Int32)

移除指定索引处的项。Removes the item at a specified index.

扩展方法

Cast<TResult>(IEnumerable) Cast<TResult>(IEnumerable) Cast<TResult>(IEnumerable) Cast<TResult>(IEnumerable)

IEnumerable 的元素强制转换为指定的类型。Casts the elements of an IEnumerable to the specified type.

OfType<TResult>(IEnumerable) OfType<TResult>(IEnumerable) OfType<TResult>(IEnumerable) OfType<TResult>(IEnumerable)

根据指定类型筛选 IEnumerable 的元素。Filters the elements of an IEnumerable based on a specified type.

AsParallel(IEnumerable) AsParallel(IEnumerable) AsParallel(IEnumerable) AsParallel(IEnumerable)

启用查询的并行化。Enables parallelization of a query.

AsQueryable(IEnumerable) AsQueryable(IEnumerable) AsQueryable(IEnumerable) AsQueryable(IEnumerable)

IEnumerable 转换为 IQueryableConverts an IEnumerable to an IQueryable.

适用于