Class MySqlParameterCollection
Represents a collection of parameters relevant to a My
Inheritance
Implements
Namespace: MySql.Data.MySqlClient
Assembly: MySql.Data.dll
Version: 9.2.0
Syntax
[ListBindable(true)]
public sealed class MySqlParameterCollection : DbParameterCollection, IDataParameterCollection, IList, ICollection, IEnumerable
Remarks
The number of the parameters in the collection must be equal to the number of parameter placeholders within the command text, or an exception will be generated.
Properties
Count
Gets the number of MySqlParameter objects in the collection.
Declaration
public override int Count { get; }
Property Value
Type | Description |
---|---|
System. |
Overrides
IsFixedSize
Gets a value that indicates whether the My
Declaration
public override bool IsFixedSize { get; }
Property Value
Type | Description |
---|---|
System. |
Overrides
IsReadOnly
Gets a value that indicates whether the My
Declaration
public override bool IsReadOnly { get; }
Property Value
Type | Description |
---|---|
System. |
Overrides
IsSynchronized
Gets a value that indicates whether the My
Declaration
public override bool IsSynchronized { get; }
Property Value
Type | Description |
---|---|
System. |
Overrides
Item[Int32]
Gets the My
Declaration
public MySqlParameter this[int index] { get; set; }
Parameters
Type | Name | Description |
---|---|---|
System. |
index |
Property Value
Type | Description |
---|---|
My |
Item[String]
Gets the My
Declaration
public MySqlParameter this[string name] { get; set; }
Parameters
Type | Name | Description |
---|---|---|
System. |
name |
Property Value
Type | Description |
---|---|
My |
SyncRoot
Gets an object that can be used to synchronize access to the
My
Declaration
public override object SyncRoot { get; }
Property Value
Type | Description |
---|---|
System. |
Overrides
Methods
Add(MySqlParameter)
Adds the specified My
Declaration
public MySqlParameter Add(MySqlParameter value)
Parameters
Type | Name | Description |
---|---|---|
My |
value | The My |
Returns
Type | Description |
---|---|
My |
The newly added My |
Add(Object)
Adds the specified My
Declaration
public override int Add(object value)
Parameters
Type | Name | Description |
---|---|---|
System. |
value | The My |
Returns
Type | Description |
---|---|
System. |
The index of the new My |
Overrides
Add(String, MySqlDbType)
Adds a My
Declaration
public MySqlParameter Add(string parameterName, MySqlDbType dbType)
Parameters
Type | Name | Description |
---|---|---|
System. |
parameterName | The name of the parameter. |
My |
dbType | One of the My |
Returns
Type | Description |
---|---|
My |
The newly added My |
Add(String, MySqlDbType, Int32)
Adds a My
Declaration
public MySqlParameter Add(string parameterName, MySqlDbType dbType, int size)
Parameters
Type | Name | Description |
---|---|---|
System. |
parameterName | The name of the parameter. |
My |
dbType | One of the My |
System. |
size | The length of the column. |
Returns
Type | Description |
---|---|
My |
The newly added My |
Add(String, MySqlDbType, Int32, String)
Adds a My
Declaration
public MySqlParameter Add(string parameterName, MySqlDbType dbType, int size, string sourceColumn)
Parameters
Type | Name | Description |
---|---|---|
System. |
parameterName | The name of the parameter. |
My |
dbType | One of the My |
System. |
size | The length of the column. |
System. |
sourceColumn | The name of the source column. |
Returns
Type | Description |
---|---|
My |
The newly added My |
AddRange(Array)
Adds an array of values to the end of the My
Declaration
public override void AddRange(Array values)
Parameters
Type | Name | Description |
---|---|---|
System. |
values |
Overrides
AddWithValue(String, Object)
Adds a parameter and its value.
Declaration
public MySqlParameter AddWithValue(string parameterName, object value)
Parameters
Type | Name | Description |
---|---|---|
System. |
parameterName | The name of the parameter. |
System. |
value | The value of the parameter. |
Returns
Type | Description |
---|---|
My |
A My |
Clear()
Removes all items from the collection.
Declaration
public override void Clear()
Overrides
Contains(Object)
Gets a value indicating whether a MySqlParameter exists in the collection.
Declaration
public override bool Contains(object value)
Parameters
Type | Name | Description |
---|---|---|
System. |
value | The value of the My |
Returns
Type | Description |
---|---|
System. |
true if the collection contains the My |
Overrides
Contains(String)
Gets a value indicating whether a My
Declaration
public override bool Contains(string parameterName)
Parameters
Type | Name | Description |
---|---|---|
System. |
parameterName | The name of the My |
Returns
Type | Description |
---|---|
System. |
true if the collection contains the parameter; otherwise, false. |
Overrides
CopyTo(Array, Int32)
Copies MySqlParameter objects from the MySqlParameterCollection to the specified array.
Declaration
public override void CopyTo(Array array, int index)
Parameters
Type | Name | Description |
---|---|---|
System. |
array | |
System. |
index |
Overrides
GetEnumerator()
Returns an enumerator that iterates through the My
Declaration
public override IEnumerator GetEnumerator()
Returns
Type | Description |
---|---|
System. |
Overrides
GetParameter(Int32)
Declaration
protected override DbParameter GetParameter(int index)
Parameters
Type | Name | Description |
---|---|---|
System. |
index |
Returns
Type | Description |
---|---|
System. |
Overrides
GetParameter(String)
Retrieve the parameter with the given name.
Declaration
protected override DbParameter GetParameter(string parameterName)
Parameters
Type | Name | Description |
---|---|---|
System. |
parameterName |
Returns
Type | Description |
---|---|
System. |
Overrides
IndexOf(Object)
Gets the location of a My
Declaration
public override int IndexOf(object value)
Parameters
Type | Name | Description |
---|---|---|
System. |
value | The My |
Returns
Type | Description |
---|---|
System. |
The zero-based location of the My |
Overrides
IndexOf(String)
Gets the location of the My
Declaration
public override int IndexOf(string parameterName)
Parameters
Type | Name | Description |
---|---|---|
System. |
parameterName | The name of the My |
Returns
Type | Description |
---|---|
System. |
The zero-based location of the My |
Overrides
Insert(Int32, Object)
Inserts a MySqlParameter into the collection at the specified index.
Declaration
public override void Insert(int index, object value)
Parameters
Type | Name | Description |
---|---|---|
System. |
index | |
System. |
value |
Overrides
Remove(Object)
Removes the specified MySqlParameter from the collection.
Declaration
public override void Remove(object value)
Parameters
Type | Name | Description |
---|---|---|
System. |
value |
Overrides
RemoveAt(Int32)
Removes the specified My
Declaration
public override void RemoveAt(int index)
Parameters
Type | Name | Description |
---|---|---|
System. |
index | The zero-based index of the parameter. |
Overrides
RemoveAt(String)
Removes the specified My
Declaration
public override void RemoveAt(string parameterName)
Parameters
Type | Name | Description |
---|---|---|
System. |
parameterName | The name of the My |
Overrides
SetParameter(Int32, DbParameter)
Declaration
protected override void SetParameter(int index, DbParameter value)
Parameters
Type | Name | Description |
---|---|---|
System. |
index | |
System. |
value |
Overrides
SetParameter(String, DbParameter)
Declaration
protected override void SetParameter(string parameterName, DbParameter value)
Parameters
Type | Name | Description |
---|---|---|
System. |
parameterName | |
System. |
value |