IDataParameterCollection 介面
定義
重要
部分資訊涉及發行前產品,在發行之前可能會有大幅修改。 Microsoft 對此處提供的資訊,不做任何明確或隱含的瑕疵擔保。
代表與 Command 物件相關的所有參數集合。
public interface class IDataParameterCollection : System::Collections::IEnumerable
public interface IDataParameterCollection : System.Collections.IEnumerable
type IDataParameterCollection = interface
interface IEnumerable
Public Interface IDataParameterCollection
Implements IEnumerable
- 實作
備註
介面 IDataParameterCollection 允許你實作參數收集。
應用程式不會直接建立介面的實例 IDataParameterCollection ,而是建立一個實作 IDataParameterCollection的類別實例。
實作 IDataParameterCollection 的類別必須實作所需的成員,並通常定義額外成員以增加提供者專屬的功能。
SQL Server Reporting Services IDataParameterCollection 介面繼承自 IEnumerable,並要求你實作一個Add方法。 IEnumerable 也要求你實作 GetEnumerator 方法。 因為 IDataParameterCollection 是一種 IList,你可以用現有的類別來完成大部分實作。 例如,如果你的 DataParameter 類別繼承 了 ArrayList,你可以使用 ArrayList.GetEnumerator 方法的預設實作。
給實作者的提示: 當你實作介面時 IDataParameterCollection ,應該實作以下建構子:
| Class | 描述 |
|---|---|
| PrvParameterCollection() | 初始化 PrvDataParameterCollection 類別的新實例。 |
方法
| 名稱 | Description |
|---|---|
| Add(IDataParameter) |
在參數集合的末尾新增一個物件。 |