EntityConnectionStringBuilder.Item[String] Property
Definition
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
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
Feedback
https://aka.ms/ContentUserFeedback.
Kommer snart: I hele 2024 udfaser vi GitHub-problemer som feedbackmekanisme for indhold og erstatter det med et nyt feedbacksystem. Du kan få flere oplysninger under:Indsend og få vist feedback om