Share via


DataConnectionProperties.ReadValueFromString(String, String, Int32) Method

Definition

Reads a property value from a connection string starting at a specified index, converts it to the correct type, and updates the index to point to a position following the property name.

protected:
 virtual System::Object ^ ReadValueFromString(System::String ^ key, System::String ^ connectionString, int % index);
protected virtual object ReadValueFromString (string key, string connectionString, ref int index);
abstract member ReadValueFromString : string * string * int -> obj
override this.ReadValueFromString : string * string * int -> obj
Protected Overridable Function ReadValueFromString (key As String, connectionString As String, ByRef index As Integer) As Object

Parameters

key
String

The name of the property key for which a value is being read.

connectionString
String

The connection string from which the value should be read.

index
Int32

Index in the connection string from which to start reading the value.

Returns

A substring of the connectionString parameter representing the property value between the input starting index and the end of the property name, converted to the correct type.

Exceptions

The key and/or connectionString parameter is null.

The index parameter is less than zero or greater than the length of the connection string.

Applies to