DataConnectionProperties.ReadNameFromString Method
Reads a property name from a connection string starting at a specified index, then updates the index to point to a position immediately following the property name.
Namespace: Microsoft.VisualStudio.Data
Assembly: Microsoft.VisualStudio.Data (in Microsoft.VisualStudio.Data.dll)
Syntax
'Declaration
Protected Overridable Function ReadNameFromString ( _
connectionString As String, _
ByRef index As Integer _
) As String
protected virtual string ReadNameFromString(
string connectionString,
ref int index
)
protected:
virtual String^ ReadNameFromString(
String^ connectionString,
int% index
)
abstract ReadNameFromString :
connectionString:string *
index:int byref -> string
override ReadNameFromString :
connectionString:string *
index:int byref -> string
protected function ReadNameFromString(
connectionString : String,
index : int
) : String
Parameters
- connectionString
Type: System.String
A connection string in a format recognized by the current DataConnectionProperties instance.
- index
Type: System.Int32%
An index into this connection string indicating where to start reading the property name.
Return Value
Type: System.String
Returns the substring of the connectionString parameter that represents the property name, between the input starting index and the end of the property name.
Exceptions
Exception | Condition |
---|---|
ArgumentNullException | The connectionString parameter is null. |
Remarks
The base implementation of the Parse method calls this method while parsing the input connection string. It uses the index parameter to track of the current position in the string and relies on this method and the ReadValueFromString method to update the index appropriately.
The base implementation of this method reads until it encounters the first property name/value pair separator.
.NET Framework Security
- Full trust for the immediate caller. This member cannot be used by partially trusted code. For more information, see Using Libraries from Partially Trusted Code.