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
    类型:String

    属性名称获取类型。

返回值

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

异常

异常 条件
ArgumentNullException

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

备注

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

.NET Framework 安全性

请参阅

参考

DataSourceInformation 类

GetType 重载

Microsoft.VisualStudio.Data.Framework 命名空间