Type.IsImport 屬性

定義

取得值,指出 Type 是否套用了 ComImportAttribute 屬性 (Attribute),亦即其是否從 COM 類型程式庫匯入。

public:
 property bool IsImport { bool get(); };
public bool IsImport { get; }
member this.IsImport : bool
Public ReadOnly Property IsImport As Boolean

屬性值

Boolean

如果 TypeComImportAttribute,則為 true,否則為 false

實作

備註

如果目前的 Type 代表結構化泛型型別,這個屬性會套用至用來建立型別的泛型型別定義。 例如,如果目前的 Type (代表 MyGenericType<int> MyGenericType(Of Integer) Visual Basic) 中的,則這個屬性的值是由MyGenericType<T>.

如果目前 Type 表示泛型型別或泛型方法定義中的類型參數,則這個屬性一律會傳回 false

適用於

另請參閱