DataGridViewComboBoxCell.ObjectCollection DataGridViewComboBoxCell.ObjectCollection DataGridViewComboBoxCell.ObjectCollection DataGridViewComboBoxCell.ObjectCollection Class

定義

表示 DataGridViewComboBoxCell 中的選項集合。Represents the collection of selection choices in a DataGridViewComboBoxCell.

public: ref class DataGridViewComboBoxCell::ObjectCollection : System::Collections::IList
[System.ComponentModel.ListBindable(false)]
public class DataGridViewComboBoxCell.ObjectCollection : System.Collections.IList
type DataGridViewComboBoxCell.ObjectCollection = class
    interface IList
    interface ICollection
    interface IEnumerable
Public Class DataGridViewComboBoxCell.ObjectCollection
Implements IList
繼承
DataGridViewComboBoxCell.ObjectCollectionDataGridViewComboBoxCell.ObjectCollectionDataGridViewComboBoxCell.ObjectCollectionDataGridViewComboBoxCell.ObjectCollection
屬性
實作

備註

您可以擷取DataGridViewComboBoxCell.ObjectCollection物件從DataGridViewComboBoxCell.Items屬性或DataGridViewComboBoxColumn.Items屬性。You can retrieve DataGridViewComboBoxCell.ObjectCollection objects from the DataGridViewComboBoxCell.Items property or the DataGridViewComboBoxColumn.Items property.

建構函式

DataGridViewComboBoxCell.ObjectCollection(DataGridViewComboBoxCell) DataGridViewComboBoxCell.ObjectCollection(DataGridViewComboBoxCell) DataGridViewComboBoxCell.ObjectCollection(DataGridViewComboBoxCell) DataGridViewComboBoxCell.ObjectCollection(DataGridViewComboBoxCell)

初始化 DataGridViewComboBoxCell.ObjectCollection 類別的新執行個體。Initializes a new instance of the DataGridViewComboBoxCell.ObjectCollection class.

屬性

Count Count Count Count

取得集合中的項目數目。Gets the number of items in the collection.

IsReadOnly IsReadOnly IsReadOnly IsReadOnly

取得值,表示集合是否為唯讀。Gets a value indicating whether the collection is read-only.

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

取得或設定位於目前索引位置的項目。Gets or sets the item at the current index location. 在 C# 中,這個屬性是 DataGridViewComboBoxCell.ObjectCollection 類別的索引子。In C#, this property is the indexer for the DataGridViewComboBoxCell.ObjectCollection class.

方法

Add(Object) Add(Object) Add(Object) Add(Object)

將項目加入至 DataGridViewComboBoxCell 的項目清單。Adds an item to the list of items for a DataGridViewComboBoxCell.

AddRange(DataGridViewComboBoxCell+ObjectCollection) AddRange(DataGridViewComboBoxCell+ObjectCollection) AddRange(DataGridViewComboBoxCell+ObjectCollection) AddRange(DataGridViewComboBoxCell+ObjectCollection)

將現有 DataGridViewComboBoxCell.ObjectCollection 的項目加入至 DataGridViewComboBoxCell 中的項目清單中。Adds the items of an existing DataGridViewComboBoxCell.ObjectCollection to the list of items in a DataGridViewComboBoxCell.

AddRange(Object[]) AddRange(Object[]) AddRange(Object[]) AddRange(Object[])

將一個或多個項目加入至 DataGridViewComboBoxCell 的項目清單中。Adds one or more items to the list of items for a DataGridViewComboBoxCell.

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

清除集合中的所有項目。Clears all items from the collection.

Contains(Object) Contains(Object) Contains(Object) Contains(Object)

判斷指定的項目是否包含在集合中。Determines whether the specified item is contained in the collection.

CopyTo(Object[], Int32) CopyTo(Object[], Int32) CopyTo(Object[], Int32) CopyTo(Object[], Int32)

將整個集合複製到陣列中,指定位置的現有物件陣列中。Copies the entire collection into an existing array of objects 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)
GetEnumerator() GetEnumerator() GetEnumerator() GetEnumerator()

傳回可以逐一查看 DataGridViewComboBoxCell.ObjectCollection 的列舉值。Returns an enumerator that can iterate through a DataGridViewComboBoxCell.ObjectCollection.

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

傳回集合中指定之項目的索引。Returns the index of the specified item in the collection.

Insert(Int32, Object) Insert(Int32, Object) Insert(Int32, Object) Insert(Int32, Object)

將項目插入至索引中的指定索引處。Inserts an item into the collection at the specified index.

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

建立目前 Object 的淺層複本 (Shallow Copy)。Creates a shallow copy of the current Object.

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

從集合中移除指定的物件。Removes the specified object from the collection.

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

移除位於指定索引處的物件。Removes the object at the specified index.

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

傳回代表目前物件的字串。Returns a string that represents the current object.

(Inherited from Object)

明確介面實作

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

將集合的元素複製至以指定的索引為起始點的指定陣列。Copies the elements of the collection to the specified array, starting at the specified index.

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.

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

將物件加入至集合。Adds an object to the collection.

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

取得值,這個值表示集合的大小是否是固定的。Gets a value indicating whether the collection has a fixed size.

擴充方法

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.

適用於

另請參閱