DbParameterCollection DbParameterCollection DbParameterCollection DbParameterCollection Class

定義

DbCommand 相關參數集合的基底類別。The base class for a collection of parameters relevant to a DbCommand.

public ref class DbParameterCollection abstract : MarshalByRefObject, System::Collections::IList, System::Data::IDataParameterCollection
public abstract class DbParameterCollection : MarshalByRefObject, System.Collections.IList, System.Data.IDataParameterCollection
type DbParameterCollection = class
    inherit MarshalByRefObject
    interface IDataParameterCollection
    interface IList
    interface ICollection
    interface IEnumerable
Public MustInherit Class DbParameterCollection
Inherits MarshalByRefObject
Implements IDataParameterCollection, IList
繼承
DbParameterCollectionDbParameterCollectionDbParameterCollectionDbParameterCollection
衍生
實作

建構函式

DbParameterCollection() DbParameterCollection() DbParameterCollection() DbParameterCollection()

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

屬性

Count Count Count Count

指定集合中的項目數目。Specifies the number of items in the collection.

IsFixedSize IsFixedSize IsFixedSize IsFixedSize

指定此集合是否為固定大小。Specifies whether the collection is a fixed size.

IsReadOnly IsReadOnly IsReadOnly IsReadOnly

指定此集合是否為唯讀。Specifies whether the collection is read-only.

IsSynchronized IsSynchronized IsSynchronized IsSynchronized

指定是否同步處理集合。Specifies whether the collection is synchronized.

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

取得或設定在指定索引處的 DbParameterGets or sets the DbParameter at the specified index.

Item[String] Item[String] Item[String] Item[String]

取得或設定具有指定之名稱的 DbParameterGets or sets the DbParameter with the specified name.

SyncRoot SyncRoot SyncRoot SyncRoot

指定要用來同步存取此集合的 ObjectSpecifies the Object to be used to synchronize access to the collection.

方法

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

將指定的 DbParameter 物件加入至 DbParameterCollectionAdds the specified DbParameter object to the DbParameterCollection.

AddRange(Array) AddRange(Array) AddRange(Array) AddRange(Array)

將具有指定值的項目陣列加入 DbParameterCollectionAdds an array of items with the specified values to the DbParameterCollection.

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

DbParameterCollection 中移除所有 DbParameter 值。Removes all DbParameter values from the DbParameterCollection.

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

指出集合中是否包含具有指定 ValueDbParameterIndicates whether a DbParameter with the specified Value is contained in the collection.

Contains(String) Contains(String) Contains(String) Contains(String)

指出集合中是否存在具有指定名稱的 DbParameterIndicates whether a DbParameter with the specified name exists in the collection.

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

從指定索引處開始,將項目的陣列複製到集合。Copies an array of items to the collection starting at the specified index.

CreateObjRef(Type) CreateObjRef(Type) CreateObjRef(Type) CreateObjRef(Type)

建立包含所有相關資訊的物件,這些資訊是產生用來與遠端物件通訊的所需 Proxy。Creates an object that contains all the relevant information required to generate a proxy used to communicate with a remote object.

(Inherited from MarshalByRefObject)
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()

公開 GetEnumerator() 方法,該方法支援由 .NET Framework 資料提供者對集合執行簡單的反覆查看。Exposes the GetEnumerator() method, which supports a simple iteration over a collection by a .NET Framework data provider.

GetHashCode() GetHashCode() GetHashCode() GetHashCode()

做為預設雜湊函式。Serves as the default hash function.

(Inherited from Object)
GetLifetimeService() GetLifetimeService() GetLifetimeService() GetLifetimeService()

擷取控制這個執行個體存留期 (Lifetime) 原則的目前存留期服務物件。Retrieves the current lifetime service object that controls the lifetime policy for this instance.

(Inherited from MarshalByRefObject)
GetParameter(Int32) GetParameter(Int32) GetParameter(Int32) GetParameter(Int32)

傳回位於此集合指定索引處的 DbParameter 物件。Returns the DbParameter object at the specified index in the collection.

GetParameter(String) GetParameter(String) GetParameter(String) GetParameter(String)

傳回具有指定名稱的 DbParameter 物件。Returns DbParameter the object with the specified name.

GetType() GetType() GetType() GetType()

取得目前執行個體的 TypeGets the Type of the current instance.

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

傳回 DbParameter 物件指定之索引。Returns the index of the specified DbParameter object.

IndexOf(String) IndexOf(String) IndexOf(String) IndexOf(String)

傳回具有指定名稱的 DbParameter 物件之索引。Returns the index of the DbParameter object with the specified name.

InitializeLifetimeService() InitializeLifetimeService() InitializeLifetimeService() InitializeLifetimeService()

取得存留期服務物件,以控制這個執行個體的存留期原則。Obtains a lifetime service object to control the lifetime policy for this instance.

(Inherited from MarshalByRefObject)
Insert(Int32, Object) Insert(Int32, Object) Insert(Int32, Object) Insert(Int32, Object)

將具有指定名稱的 DbParameter 物件指定索引插入位於指定索引的集合中。Inserts the specified index of the DbParameter object with the specified name 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)
MemberwiseClone(Boolean) MemberwiseClone(Boolean) MemberwiseClone(Boolean) MemberwiseClone(Boolean)

建立目前 MarshalByRefObject 物件的淺層複本。Creates a shallow copy of the current MarshalByRefObject object.

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

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

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

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

RemoveAt(String) RemoveAt(String) RemoveAt(String) RemoveAt(String)

從集合中移除具有指定名稱的 DbParameter 物件。Removes the DbParameter object with the specified name from the collection.

SetParameter(Int32, DbParameter) SetParameter(Int32, DbParameter) SetParameter(Int32, DbParameter) SetParameter(Int32, DbParameter)

將指定索引處的 DbParameter 物件設定為新值。Sets the DbParameter object at the specified index to a new value.

SetParameter(String, DbParameter) SetParameter(String, DbParameter) SetParameter(String, DbParameter) SetParameter(String, DbParameter)

將具有指定名稱的 DbParameter 物件設定為新值。Sets the DbParameter object with the specified name to a new value.

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

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

(Inherited from Object)

明確介面實作

ICollection.IsSynchronized ICollection.IsSynchronized ICollection.IsSynchronized ICollection.IsSynchronized
IDataParameterCollection.Item[String] IDataParameterCollection.Item[String] IDataParameterCollection.Item[String] IDataParameterCollection.Item[String]

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

IList.IsFixedSize IList.IsFixedSize IList.IsFixedSize IList.IsFixedSize
IList.IsReadOnly IList.IsReadOnly IList.IsReadOnly IList.IsReadOnly
IList.Item[Int32] IList.Item[Int32] IList.Item[Int32] IList.Item[Int32]

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

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.

適用於

另請參閱