IDataParameterCollection IDataParameterCollection IDataParameterCollection IDataParameterCollection Interface


收集所有與 Command 物件相關的參數及其與 DataSet 資料行的對應,而且是由存取資料來源的 .NET Framework 資料提供者所實作。Collects all parameters relevant to a Command object and their mappings to DataSet columns, and is implemented by .NET Framework data providers that access data sources.

public interface class IDataParameterCollection : System::Collections::IList
public interface IDataParameterCollection : System.Collections.IList
type IDataParameterCollection = interface
    interface IList
    interface ICollection
    interface IEnumerable
Public Interface IDataParameterCollection
Implements IList


IDataParameterCollection介面可讓繼承的類別來實作的參數集合。The IDataParameterCollection interface allows an inheriting class to implement a Parameter collection. 如需參數類別的詳細資訊,請參閱設定參數和參數資料類型For more information about Parameter classes, see Configuring Parameters and Parameter Data Types.

應用程式不會建立的執行個體IDataParameterCollection介面直接,但建立繼承的類別的執行個體IDataParameterCollectionAn application does not create an instance of the IDataParameterCollection interface directly, but creates an instance of a class that inherits IDataParameterCollection.

繼承的類別IDataParameterCollection必須實作繼承的成員,並通常會定義要新增提供者特有的功能的其他成員。Classes that inherit IDataParameterCollection must implement the inherited members, and typically define additional members to add provider-specific functionality. 例如,IDataParameterCollection介面會定義的其中一個實作RemoveAt方法。For example, the IDataParameterCollection interface defines one implementation of the RemoveAt method. 依次OleDbParameterCollection類別會繼承這個方法,並定義兩個額外的多載的RemoveAtIn turn, the OleDbParameterCollection class inherits this method, and defines two additional overloads of RemoveAt.


當您繼承自IDataParameterCollection介面,您應該實作下列建構函式。When you inherit from the IDataParameterCollection interface, you should implement the following constructor.

項目Item 說明Description
PrvParameterCollection()PrvParameterCollection() 建立空的 PrvParameterCollection 類別。Creates an empty PrvParameterCollection class.


Count Count Count Count

取得 ICollection 中所包含的項目數。Gets the number of elements contained in the ICollection.

(Inherited from ICollection)
IsFixedSize IsFixedSize IsFixedSize IsFixedSize

取得值,指出 IList 是否有固定的大小。Gets a value indicating whether the IList has a fixed size.

(Inherited from IList)
IsReadOnly IsReadOnly IsReadOnly IsReadOnly

取得值,指出 IList 是否唯讀。Gets a value indicating whether the IList is read-only.

(Inherited from IList)
IsSynchronized IsSynchronized IsSynchronized IsSynchronized

取得值,這個值表示對 ICollection 的存取是否同步 (安全執行緒)。Gets a value indicating whether access to the ICollection is synchronized (thread safe).

(Inherited from ICollection)
Item[Int32] Item[Int32] Item[Int32] Item[Int32]

在指定的索引位置上取得或設定項目。Gets or sets the element at the specified index.

(Inherited from IList)
Item[String] Item[String] Item[String] Item[String]

在指定索引位置上取得或設定參數。Gets or sets the parameter at the specified index.

SyncRoot SyncRoot SyncRoot SyncRoot

取得可用以同步存取 ICollection 的物件。Gets an object that can be used to synchronize access to the ICollection.

(Inherited from ICollection)


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

將項目加入至 IListAdds an item to the IList.

(Inherited from IList)
Clear() Clear() Clear() Clear()

IList 中移除所有項目。Removes all items from the IList.

(Inherited from IList)
Contains(Object) Contains(Object) Contains(Object) Contains(Object)

判斷 IList 是否包含特定值。Determines whether the IList contains a specific value.

(Inherited from IList)
Contains(String) Contains(String) Contains(String) Contains(String)

取得值,表示集合中的參數是否具有指定的名稱。Gets a value indicating whether a parameter in the collection has the specified name.

CopyTo(Array, Int32) CopyTo(Array, Int32) CopyTo(Array, Int32) CopyTo(Array, Int32)

從特定的 ICollection 索引開始,將 Array 的項目複製到 ArrayCopies the elements of the ICollection to an Array, starting at a particular Array index.

(Inherited from ICollection)
GetEnumerator() GetEnumerator() GetEnumerator() GetEnumerator()

傳回逐一查看集合的列舉值。Returns an enumerator that iterates through a collection.

(Inherited from IEnumerable)
IndexOf(Object) IndexOf(Object) IndexOf(Object) IndexOf(Object)

判斷 IList 中指定項目的索引。Determines the index of a specific item in the IList.

(Inherited from IList)
IndexOf(String) IndexOf(String) IndexOf(String) IndexOf(String)

取得集合中 IDataParameter 的位置。Gets the location of the IDataParameter within the collection.

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

將項目插入位於指定索引的 IListInserts an item to the IList at the specified index.

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

IList 移除特定物件之第一個符合的元素。Removes the first occurrence of a specific object from the IList.

(Inherited from IList)
RemoveAt(Int32) RemoveAt(Int32) RemoveAt(Int32) RemoveAt(Int32)

移除在指定索引處的 IList 項目。Removes the IList item at the specified index.

(Inherited from IList)
RemoveAt(String) RemoveAt(String) RemoveAt(String) RemoveAt(String)

從集合中移除 IDataParameterRemoves the IDataParameter from the collection.

Extension Methods

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)

將轉換IEnumerableIQueryableConverts an IEnumerable to an IQueryable.