Item Property
Syntax:
public Object this[string keyword] { get; set; }
Description:
Type: System.Object
The value to associate with the specified key. If the specified key is valid, but not found, trying to get it returns a null reference and trying to set it creates a new element using the specified key.
Parameters:
keyword
Type: System.String
Specifies the key of the item to get or set. See ConnectionString for a list of valid keywords.
Exceptions:
Exception | Condition |
---|---|
ArgumentNullException | The key specified is null. |
ArgumentException | The key specified is not a valid key. |
ArgumentException | The value is not appropriate for the specified key. |
OverflowException | The value was expected to be a number but was too large or small for an Int32. |
FormatException | The value was expected to be numeric but was not a valid number |
Reference:
For more information, reference MSDN documentation for: System.Data.Common.DbConnectionStringBuilder.Item