DataSourceInformation.GetType 方法 (String)

检索值指示指定属性的类型 Type 值,从而使一个检索到的值的相应转换为正确的类型。

命名空间:  Microsoft.VisualStudio.Data.Framework
程序集:  Microsoft.VisualStudio.Data.Framework(在 Microsoft.VisualStudio.Data.Framework.dll 中)

语法

声明
Protected Overridable Function GetType ( _
    propertyName As String _
) As Type
protected virtual Type GetType(
    string propertyName
)
protected:
virtual Type^ GetType(
    String^ propertyName
)
abstract GetType : 
        propertyName:string -> Type 
override GetType : 
        propertyName:string -> Type 
protected function GetType(
    propertyName : String
) : Type

参数

  • propertyName
    类型:System.String
    属性的名称访问的类型。

返回值

类型:System.Type
指示指定属性的类型 Type 值。

异常

异常 条件
ArgumentNullException

propertyName 参数为 nullnull 引用(在 Visual Basic 中为 Nothing)。

备注

如果找不到属性,则此方法返回 typeof(System.String) 为默认类型。

.NET Framework 安全性

请参见

参考

DataSourceInformation 类

GetType 重载

Microsoft.VisualStudio.Data.Framework 命名空间