在属性的名称后,读取启动位于指定索引的连接字符串属性的值,将它强制转换为正确的类型,并且更新索引指向位置。
命名空间: Microsoft.VisualStudio.Data.Framework
程序集: Microsoft.VisualStudio.Data.Framework(在 Microsoft.VisualStudio.Data.Framework.dll 中)
语法
声明
Protected Overridable Function ReadValueFromString ( _
key As String, _
connectionString As String, _
ByRef index As Integer _
) As Object
protected virtual Object ReadValueFromString(
string key,
string connectionString,
ref int index
)
protected:
virtual Object^ ReadValueFromString(
String^ key,
String^ connectionString,
int% index
)
abstract ReadValueFromString :
key:string *
connectionString:string *
index:int byref -> Object
override ReadValueFromString :
key:string *
connectionString:string *
index:int byref -> Object
protected function ReadValueFromString(
key : String,
connectionString : String,
index : int
) : Object
参数
key
类型:String读取属性值的关键字的名称。
connectionString
类型:String值应读取的连接字符串。
index
类型:Int32%在开始阅读的连接字符串的索引值。
返回值
类型:Object
表示的输入范围的 connectionString 参数的子字符串属性值开始索引和属性名称的末尾,转换为正确的类型。
异常
异常 | 条件 |
---|---|
ArgumentOutOfRangeException | key 和 connectionString 参数为 nullnull 引用(在 Visual Basic 中为 Nothing)。 |
IndexOutOfRangeException | index 参数大于零大于或小于连接字符串的长度。 |
备注
Parse 方法调用的基实现此方法,以便分析输入连接字符串。 它使用 index 参数。跟踪字符串中的当前位置和依赖此方法和 ReadKeyFromString 方法需要更新索引。
.NET Framework 安全性
- 对直接调用方的完全信任。此成员不能由部分信任的代码使用。有关详细信息,请参阅通过部分受信任的代码使用库。