共用方式為


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 命名空間