CollectionBase 成员

为强类型集合提供 abstract 基类。

下表列出了由 CollectionBase 类型公开的成员。

受保护的构造函数

  名称 说明
Protected method Supported by the .NET Compact Framework CollectionBase 已重载。初始化 CollectionBase 类的新实例。

页首

公共属性

(请参见 受保护的属性 )

  名称 说明
Public property Supported by the .NET Compact Framework Capacity 获取或设置 CollectionBase 可包含的元素数。
Public property Supported by the .NET Compact Framework Count 获取包含在 CollectionBase 实例中的元素数。不能重写此属性。

页首

受保护的属性

  名称 说明
Protected property Supported by the .NET Compact Framework InnerList 获取一个 ArrayList,它包含 CollectionBase 实例中元素的列表。
Protected property Supported by the .NET Compact Framework List 获取一个 IList,它包含 CollectionBase 实例中元素的列表。

页首

公共方法

(请参见 受保护的方法 )

  名称 说明
Public method Supported by the .NET Compact Framework Clear CollectionBase 实例移除所有对象。不能重写此方法。
Public method Supported by the .NET Compact Framework Equals  已重载。 确定两个 Object 实例是否相等。 (从 Object 继承。)
Public method Supported by the .NET Compact Framework GetEnumerator 返回循环访问 CollectionBase 实例的枚举数。
Public method Supported by the .NET Compact Framework GetHashCode  用作特定类型的哈希函数。GetHashCode 适合在哈希算法和数据结构(如哈希表)中使用。 (从 Object 继承。)
Public method Supported by the .NET Compact Framework GetType  获取当前实例的 Type。 (从 Object 继承。)
Public method Static Supported by the .NET Compact Framework ReferenceEquals  确定指定的 Object 实例是否是相同的实例。 (从 Object 继承。)
Public method Supported by the .NET Compact Framework RemoveAt 移除 CollectionBase 实例的指定索引处的元素。此方法不可重写。
Public method Supported by the .NET Compact Framework ToString  返回表示当前 ObjectString。 (从 Object 继承。)

页首

受保护的方法

  名称 说明
Protected method Supported by the .NET Compact Framework Finalize  允许 Object 在“垃圾回收”回收 Object 之前尝试释放资源并执行其他清理操作。 (从 Object 继承。)
Protected method Supported by the .NET Compact Framework MemberwiseClone  创建当前 Object 的浅表副本。 (从 Object 继承。)
Protected method Supported by the .NET Compact Framework OnClear 当清除 CollectionBase 实例的内容时执行其他自定义进程。
Protected method Supported by the .NET Compact Framework OnClearComplete 在清除 CollectionBase 实例的内容之后执行其他自定义进程。
Protected method Supported by the .NET Compact Framework OnInsert 在向 CollectionBase 实例中插入新元素之前执行其他自定义进程。
Protected method Supported by the .NET Compact Framework OnInsertComplete 在向 CollectionBase 实例中插入新元素之后执行其他自定义进程。
Protected method Supported by the .NET Compact Framework OnRemove 当从 CollectionBase 实例移除元素时执行其他自定义进程。
Protected method Supported by the .NET Compact Framework OnRemoveComplete 在从 CollectionBase 实例中移除元素之后执行其他自定义进程。
Protected method Supported by the .NET Compact Framework OnSet 当在 CollectionBase 实例中设置值之前执行其他自定义进程。
Protected method Supported by the .NET Compact Framework OnSetComplete 当在 CollectionBase 实例中设置值后执行其他自定义进程。
Protected method Supported by the .NET Compact Framework OnValidate 当验证值时执行其他自定义进程。

页首

显式接口实现

  名称 说明
Explicit interface implementation Method Supported by the .NET Compact Framework System.Collections.ICollection.CopyTo 从目标数组的指定索引处开始将整个 CollectionBase 复制到兼容的一维 Array
Explicit interface implementation Method Supported by the .NET Compact Framework System.Collections.IList.Add 将对象添加到 CollectionBase 的结尾处。
Explicit interface implementation Method Supported by the .NET Compact Framework System.Collections.IList.Contains 确定 CollectionBase 是否包含特定元素。
Explicit interface implementation Method Supported by the .NET Compact Framework System.Collections.IList.IndexOf 搜索指定的 Object,并返回整个 CollectionBase 中第一个匹配项的从零开始的索引。
Explicit interface implementation Method Supported by the .NET Compact Framework System.Collections.IList.Insert 将元素插入 CollectionBase 的指定索引处。
Explicit interface implementation Method Supported by the .NET Compact Framework System.Collections.IList.Remove CollectionBase 中移除特定对象的第一个匹配项。
Explicit interface implementation Property Supported by the .NET Compact Framework System.Collections.ICollection.IsSynchronized 获取一个值,该值指示是否同步对 CollectionBase 的访问(线程安全)。
Explicit interface implementation Property Supported by the .NET Compact Framework System.Collections.ICollection.SyncRoot 获取可用于同步 CollectionBase 访问的对象。
Explicit interface implementation Property Supported by the .NET Compact Framework System.Collections.IList.IsFixedSize 获取一个值,该值指示 CollectionBase 是否具有固定大小。
Explicit interface implementation Property Supported by the .NET Compact Framework System.Collections.IList.IsReadOnly 获取一个值,该值指示 CollectionBase 是否为只读。
Explicit interface implementation Property Supported by the .NET Compact Framework System.Collections.IList.Item 获取或设置指定索引处的元素。

页首

请参见

参考

CollectionBase 类
System.Collections 命名空间
ArrayList 类
System.Collections.IList
ReadOnlyCollectionBase
System.Collections.Generic

其他资源

执行不区分区域性的字符串操作