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)

建立包含所有相關資訊的物件,這些資訊是產生用來與遠端物件通訊的所需 Proxy。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()
已過時。

擷取控制這個執行個體存留期 (Lifetime) 原則的目前存留期服務物件。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.

適用於