AutoCompleteStringCollection AutoCompleteStringCollection AutoCompleteStringCollection AutoCompleteStringCollection Class


包含一个字符串集合,它用于某些 Windows 窗体控件上的自动完成功能。Contains a collection of strings to use for the auto-complete feature on certain Windows Forms controls.

public ref class AutoCompleteStringCollection : System::Collections::IList
public class AutoCompleteStringCollection : System.Collections.IList
type AutoCompleteStringCollection = class
    interface IList
    interface ICollection
    interface IEnumerable
Public Class AutoCompleteStringCollection
Implements IList


AutoCompleteStringCollection() AutoCompleteStringCollection() AutoCompleteStringCollection() AutoCompleteStringCollection()

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


Count Count Count Count

获取 AutoCompleteStringCollection 中的项数。Gets the number of items in the AutoCompleteStringCollection .

IsReadOnly IsReadOnly IsReadOnly IsReadOnly

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

IsSynchronized IsSynchronized IsSynchronized IsSynchronized

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

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

获取或设置指定索引处的元素。Gets or sets the element at the specified index.

SyncRoot SyncRoot SyncRoot SyncRoot

获取可用于同步对 AutoCompleteStringCollection 的访问的对象。Gets an object that can be used to synchronize access to the AutoCompleteStringCollection.


Add(String) Add(String) Add(String) Add(String)

将新的 String 插入集合。Inserts a new String into the collection.

AddRange(String[]) AddRange(String[]) AddRange(String[]) AddRange(String[])

String 集合的元素添加到末尾。Adds the elements of a String collection to the end.

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

从集合中移除所有字符串。Removes all strings from the collection.

Contains(String) Contains(String) Contains(String) Contains(String)

指示 String 是否存在于集合中。Indicates whether the String exists within the collection.

CopyTo(String[], Int32) CopyTo(String[], Int32) CopyTo(String[], Int32) CopyTo(String[], Int32)

从指定的位置开始,将 String 对象的数组复制到集合中。Copies an array of String objects into the collection, starting at the specified position.

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

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

(Inherited from Object)
GetEnumerator() GetEnumerator() GetEnumerator() GetEnumerator()

返回循环访问 AutoCompleteStringCollection 的枚举数。Returns an enumerator that iterates through the AutoCompleteStringCollection.

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(String) IndexOf(String) IndexOf(String) IndexOf(String)

获取指定字符串在集合中的位置。Obtains the position of the specified string within the collection.

Insert(Int32, String) Insert(Int32, String) Insert(Int32, String) Insert(Int32, String)

将字符串插入集合中特定索引处。Inserts the string into a specific index in the collection.

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

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

(Inherited from Object)
OnCollectionChanged(CollectionChangeEventArgs) OnCollectionChanged(CollectionChangeEventArgs) OnCollectionChanged(CollectionChangeEventArgs) OnCollectionChanged(CollectionChangeEventArgs)

引发 CollectionChanged 事件。Raises the CollectionChanged event.

Remove(String) Remove(String) Remove(String) Remove(String)

从集合中移除字符串。Removes a string from the collection.

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

移除指定索引处的字符串。Removes the string at the specified index.

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

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

(Inherited from Object)


CollectionChanged CollectionChanged CollectionChanged CollectionChanged

当集合更改时发生。Occurs when the collection changes.


ICollection.CopyTo(Array, Int32) ICollection.CopyTo(Array, Int32) ICollection.CopyTo(Array, Int32) ICollection.CopyTo(Array, Int32)

从特定的 Array 索引开始,将集合中的字符串复制到 Array 中。Copies the strings of the collection to an Array, starting at a particular Array index. 有关此成员的说明,请参见 CopyTo(Array, Int32)For a description of this member, see CopyTo(Array, Int32).

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

向集合中添加字符串。Adds a string to the collection. 有关此成员的说明,请参见 Add(Object)For a description of this member, see Add(Object).

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

确定集合中包含指定字符串的位置。Determines where the collection contains a specified string. 有关此成员的说明,请参见 Contains(Object)For a description of this member, see Contains(Object).

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

确定集合中指定字符串的索引。Determines the index of a specified string in the collection. 有关此成员的说明,请参见 IndexOf(Object)For a description of this member, see IndexOf(Object).

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

将一个项插入到集合中指定的索引处。Inserts an item to the collection at the specified index. 有关此成员的说明,请参见 Insert(Int32, Object)For a description of this member, see Insert(Int32, Object).

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

获取一个值,该值指示集合是否具有固定大小。Gets a value indicating whether the collection has a fixed size. 有关此成员的说明,请参见 IsFixedSizeFor a description of this member, see IsFixedSize.

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

获取一个值,该值指示集合是否为只读。Gets a value indicating whether the collection is read-only. 有关此成员的说明,请参见 IsReadOnlyFor a description of this member, see IsReadOnly.

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

获取指定索引处的元素。Gets the element at a specified index. 有关此成员的说明,请参见 Item[Int32]For a description of this member, see Item[Int32].

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

从集合中移除特定字符串的第一个匹配项。Removes the first occurrence of a specific string from the collection. 有关此成员的说明,请参见 Remove(Object)For a description of this member, see Remove(Object).


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.