IDataParameterCollection 介面

定義

收集所有與 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介面的實例, 而是會建立繼承IDataParameterCollection之類別的實例。An 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類別會繼承這個方法, 並定義兩個額外的RemoveAt多載。In 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

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

(繼承來源 ICollection)
IsFixedSize

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

(繼承來源 IList)
IsReadOnly

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

(繼承來源 IList)
IsSynchronized

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

(繼承來源 ICollection)
Item[Int32]

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

(繼承來源 IList)
Item[String]

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

SyncRoot

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

(繼承來源 ICollection)

方法

Add(Object)

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

(繼承來源 IList)
Clear()

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

(繼承來源 IList)
Contains(Object)

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

(繼承來源 IList)
Contains(String)

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

CopyTo(Array, Int32)

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

(繼承來源 ICollection)
GetEnumerator()

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

(繼承來源 IEnumerable)
IndexOf(Object)

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

(繼承來源 IList)
IndexOf(String)

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

Insert(Int32, Object)

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

(繼承來源 IList)
Remove(Object)

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

(繼承來源 IList)
RemoveAt(Int32)

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

(繼承來源 IList)
RemoveAt(String)

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

擴充方法

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.

適用於