BaseCollection 类

定义

提供用于在 System.Windows.Forms 命名空间中创建与数据相关的集合的基本功能。Provides the base functionality for creating data-related collections in the System.Windows.Forms namespace.

public ref class BaseCollection : MarshalByRefObject, System::Collections::ICollection
public class BaseCollection : MarshalByRefObject, System.Collections.ICollection
type BaseCollection = class
    inherit MarshalByRefObject
    interface ICollection
    interface IEnumerable
Public Class BaseCollection
Inherits MarshalByRefObject
Implements ICollection
继承
BaseCollection
派生
实现

注解

BaseCollection类不应由应用程序开发人员使用。The BaseCollection class is not intended for use by application developers. 应用程序开发人员CollectionBase应该改用。Application developers should use CollectionBase instead.

BaseCollection 类实现 ICollection 接口。The BaseCollection class implements the ICollection interface.

派生自BaseCollection类的类包括:Classes that derive from the BaseCollection class include:

构造函数

BaseCollection()

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

属性

Count

获取集合中元素的总数。Gets the total number of elements in the collection.

IsReadOnly

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

IsSynchronized

获取一个值,该值指示对 ICollection 的访问是否同步。Gets a value indicating whether access to the ICollection is synchronized.

List

获取包含在 BaseCollection 实例中的元素的列表。Gets the list of elements contained in the BaseCollection instance.

SyncRoot

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

方法

CopyTo(Array, Int32)

将当前一维 Array 的所有元素复制到指定的一维 Array 中(从指定的目标 Array 索引开始)。Copies all the elements of the current one-dimensional Array to the specified one-dimensional Array starting at the specified destination Array index.

CreateObjRef(Type)

创建一个对象,该对象包含生成用于与远程对象进行通信的代理所需的全部相关信息。Creates an object that contains all the relevant information required to generate a proxy used to communicate with a remote object.

(继承自 MarshalByRefObject)
Equals(Object)

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

(继承自 Object)
GetEnumerator()

获取能够循环访问集合成员的对象。Gets the object that enables iterating through the members of the collection.

GetHashCode()

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

(继承自 Object)
GetLifetimeService()

检索控制此实例的生存期策略的当前生存期服务对象。Retrieves the current lifetime service object that controls the lifetime policy for this instance.

(继承自 MarshalByRefObject)
GetType()

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

(继承自 Object)
InitializeLifetimeService()

获取生存期服务对象来控制此实例的生存期策略。Obtains a lifetime service object to control the lifetime policy for this instance.

(继承自 MarshalByRefObject)
MemberwiseClone()

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

(继承自 Object)
MemberwiseClone(Boolean)

创建当前 MarshalByRefObject 对象的浅表副本。Creates a shallow copy of the current MarshalByRefObject object.

(继承自 MarshalByRefObject)
ToString()

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

(继承自 Object)

扩展方法

Cast<TResult>(IEnumerable)

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

OfType<TResult>(IEnumerable)

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

AsParallel(IEnumerable)

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

AsQueryable(IEnumerable)

IEnumerable 转换为 IQueryableConverts an IEnumerable to an IQueryable.

适用于