Class MySqlAttributeCollection
Represents a collection of query attributes relevant to a MySqlCommand.
Namespace: MySql.Data.MySqlClient
Assembly: MySql.Data.dll
Version: 9.0.0
Syntax
public class MySqlAttributeCollection
Properties
Count
Gets the number of MySqlAttribute objects in the collection.
Declaration
public int Count { get; }
Property Value
Type | Description |
---|---|
Int32 |
Item[Int32]
Gets the MySqlAttribute at the specified index.
Declaration
public MySqlAttribute this[int index] { get; }
Parameters
Type | Name | Description |
---|---|---|
Int32 | index |
Property Value
Type | Description |
---|---|
MySqlAttribute |
Methods
Clear()
Removes all items from the collection.
Declaration
public void Clear()
GetEnumerator()
Returns an enumerator that iterates through the MySqlAttributeCollection.
Declaration
public IEnumerator<MySqlAttribute> GetEnumerator()
Returns
Type | Description |
---|---|
IEnumerator<MySqlAttribute> |
SetAttribute(MySqlAttribute)
Adds the specified MySqlAttribute object to the MySqlAttributeCollection.
Declaration
public MySqlAttribute SetAttribute(MySqlAttribute value)
Parameters
Type | Name | Description |
---|---|---|
MySqlAttribute | value | MySqlAttribute object to add. |
Returns
Type | Description |
---|---|
MySqlAttribute |
SetAttribute(String, Object)
Adds a query attribute and its value.
Declaration
public MySqlAttribute SetAttribute(string attributeName, object value)
Parameters
Type | Name | Description |
---|---|---|
String | attributeName | Name of the query attribute. |
Object | value | Value of the query attribute. |
Returns
Type | Description |
---|---|
MySqlAttribute |