EntityConnectionStringBuilder.Item[String] Property

Definition

Gets or sets the value associated with the specified key. In C#, this property is the indexer.

public:
 virtual property System::Object ^ default[System::String ^] { System::Object ^ get(System::String ^ keyword); void set(System::String ^ keyword, System::Object ^ value); };
public override object this[string keyword] { get; set; }
member this.Item(string) : obj with get, set
Default Public Overrides Property Item(keyword As String) As Object

Parameters

keyword
String

The key of the item to get or set.

Property Value

The value associated with the specified key.

Exceptions

keyword is a null reference (Nothing in Visual Basic).

Tried to add a key that does not exist in the available keys.

Invalid value in the connection string (specifically, a Boolean or numeric value was expected but not supplied).

Remarks

Because the EntityConnectionStringBuilder contains a fixed-size dictionary, trying to add a key that does not exist in the dictionary throws a KeyNotFoundException.

For valid keyword/value syntax, see ConnectionString.

Applies to

See also