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

Parameters

propertyName
String

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

connectionString
String

The connection string from which the value should be read.

index
Int32

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

Returns

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 name and/or connectionString parameter is null.

The format of the connection string is invalid.

The read string value cannot be converted to the property type.

Applies to