SaaS CMS has officially launched! Learn more now.

Class SqlParameterList

Represents the SqlParameter collection.

Inheritance
System.Object
System.Collections.CollectionBase
SqlParameterList
Implements
System.Collections.IList
System.Collections.ICollection
System.Collections.IEnumerable
Inherited Members
System.Collections.CollectionBase.Clear()
System.Collections.CollectionBase.RemoveAt(System.Int32)
System.Collections.CollectionBase.System.Collections.ICollection.CopyTo(System.Array, System.Int32)
System.Collections.CollectionBase.System.Collections.IList.get_Item(System.Int32)
System.Collections.CollectionBase.System.Collections.IList.set_Item(System.Int32, System.Object)
System.Collections.CollectionBase.System.Collections.IList.Contains(System.Object)
System.Collections.CollectionBase.System.Collections.IList.Add(System.Object)
System.Collections.CollectionBase.System.Collections.IList.Remove(System.Object)
System.Collections.CollectionBase.System.Collections.IList.IndexOf(System.Object)
System.Collections.CollectionBase.System.Collections.IList.Insert(System.Int32, System.Object)
System.Collections.CollectionBase.GetEnumerator()
System.Collections.CollectionBase.OnSet(System.Int32, System.Object, System.Object)
System.Collections.CollectionBase.OnInsert(System.Int32, System.Object)
System.Collections.CollectionBase.OnClear()
System.Collections.CollectionBase.OnRemove(System.Int32, System.Object)
System.Collections.CollectionBase.OnValidate(System.Object)
System.Collections.CollectionBase.OnSetComplete(System.Int32, System.Object, System.Object)
System.Collections.CollectionBase.OnInsertComplete(System.Int32, System.Object)
System.Collections.CollectionBase.OnClearComplete()
System.Collections.CollectionBase.OnRemoveComplete(System.Int32, System.Object)
System.Collections.CollectionBase.InnerList
System.Collections.CollectionBase.List
System.Collections.CollectionBase.Capacity
System.Collections.CollectionBase.Count
System.Collections.CollectionBase.System.Collections.IList.IsReadOnly
System.Collections.CollectionBase.System.Collections.IList.IsFixedSize
System.Collections.CollectionBase.System.Collections.ICollection.IsSynchronized
System.Collections.CollectionBase.System.Collections.ICollection.SyncRoot
System.Collections.CollectionBase.System.Collections.IList.Item[System.Int32]
System.Object.ToString()
System.Object.Equals(System.Object)
System.Object.Equals(System.Object, System.Object)
System.Object.ReferenceEquals(System.Object, System.Object)
System.Object.GetHashCode()
System.Object.GetType()
System.Object.MemberwiseClone()
Namespace: Mediachase.BusinessFoundation.Data.Sql
Assembly: Mediachase.BusinessFoundation.Data.dll
Version: 11.8.3
Syntax
public class SqlParameterList : CollectionBase, IList, ICollection, IEnumerable

Constructors

SqlParameterList()

Initializes a new instance of the SqlParameterList class.

Declaration
public SqlParameterList()

Properties

Item[Int32]

Gets or sets the element at the specified index.

Declaration
public virtual SqlParameter this[int index] { get; set; }
Parameters
Type Name Description
System.Int32 index
Property Value
Type Description
System.Data.SqlClient.SqlParameter

Item[String]

Gets the System.Data.SqlClient.SqlParameter with the specified param name.

Declaration
public SqlParameter this[string paramName] { get; }
Parameters
Type Name Description
System.String paramName
Property Value
Type Description
System.Data.SqlClient.SqlParameter

Methods

Add(SqlParameter)

Adds an SqlParameter to the SqlParameterList.

Declaration
public virtual int Add(SqlParameter param)
Parameters
Type Name Description
System.Data.SqlClient.SqlParameter param

The SqlParameter to be added to the SqlParameterList

Returns
Type Description
System.Int32

The index at which the value has been added.

Add(SqlDbType, Object)

Adds the specified db type named @AutoParam#.

Declaration
public virtual SqlParameter Add(SqlDbType dbType, object value)
Parameters
Type Name Description
System.Data.SqlDbType dbType

Type of the db.

System.Object value

The value.

Returns
Type Description
System.Data.SqlClient.SqlParameter

Add(String, SqlDbType)

Creates a new SqlParameter by parameterName and SqlDbType and adds an SqlParameter to the SqlParameterList.

Declaration
public virtual SqlParameter Add(string parameterName, SqlDbType dbType)
Parameters
Type Name Description
System.String parameterName

The name of the parameter to map.

System.Data.SqlDbType dbType

One of the System.Data.SqlDbType values.

Returns
Type Description
System.Data.SqlClient.SqlParameter

A new SqlParameter object.

Add(String, SqlDbType, Int32, Object)

Creates a new SqlParameter by parameterName, SqlDbType, value and adds an SqlParameter to the SqlParameterList.

Declaration
public virtual SqlParameter Add(string parameterName, SqlDbType dbType, int size, object value)
Parameters
Type Name Description
System.String parameterName

The name of the parameter to map.

System.Data.SqlDbType dbType

One of the System.Data.SqlDbType values.

System.Int32 size

The length of the parameter.

System.Object value

An Object that is the value of the SqlParameter.

Returns
Type Description
System.Data.SqlClient.SqlParameter

A new SqlParameter object.

Add(String, SqlDbType, Object)

Creates a new SqlParameter by parameterName, SqlDbType, value and adds an SqlParameter to the SqlParameterList.

Declaration
public virtual SqlParameter Add(string parameterName, SqlDbType dbType, object value)
Parameters
Type Name Description
System.String parameterName

The name of the parameter to map.

System.Data.SqlDbType dbType

One of the System.Data.SqlDbType values.

System.Object value

An Object that is the value of the SqlParameter.

Returns
Type Description
System.Data.SqlClient.SqlParameter

A new SqlParameter object.

Add(String, Object)

Creates a new SqlParameter by parameterName and value and adds an SqlParameter to the SqlParameterList.

Declaration
public virtual SqlParameter Add(string parameterName, object value)
Parameters
Type Name Description
System.String parameterName

The name of the parameter to map.

System.Object value

An Object that is the value of the SqlParameter.

Returns
Type Description
System.Data.SqlClient.SqlParameter

A new SqlParameter object.

Contains(String)

Determines whether [contains] [the specified param name].

Declaration
public bool Contains(string paramName)
Parameters
Type Name Description
System.String paramName

Name of the param.

Returns
Type Description
System.Boolean

true if [contains] [the specified param name]; otherwise, false.

IndexOf(String)

Indexes the of.

Declaration
public int IndexOf(string paramName)
Parameters
Type Name Description
System.String paramName

Name of the param.

Returns
Type Description
System.Int32

Remove(SqlParameter)

Removes the first occurrence of a specific object from the SqlParameterList.

Declaration
public virtual void Remove(SqlParameter param)
Parameters
Type Name Description
System.Data.SqlClient.SqlParameter param

The SqlParameter to remove.

ToArray()

Copies the elements of the SqlParameterList to a new array.

Declaration
public SqlParameter[] ToArray()
Returns
Type Description
System.Data.SqlClient.SqlParameter[]

An SqlParameter array containing copies of the elements of the SqlParameterList.

ToArray(SqlParameter[])

Copies the elements of the SqlParameterList to a new array and adds an additional params.

Declaration
public virtual SqlParameter[] ToArray(params SqlParameter[] addParams)
Parameters
Type Name Description
System.Data.SqlClient.SqlParameter[] addParams

An additioanl SqlParameter items or null (Nothing in Visual Basic).

Returns
Type Description
System.Data.SqlClient.SqlParameter[]

An SqlParameter array containing copies of the elements of the SqlParameterList.

Implements

System.Collections.IList
System.Collections.ICollection
System.Collections.IEnumerable