Type.IsImport Type.IsImport Type.IsImport Type.IsImport Property

定義

取得值,指出 Type 是否套用了 ComImportAttribute 屬性 (Attribute),亦即其是否從 COM 類型程式庫匯入。Gets a value indicating whether the Type has a ComImportAttribute attribute applied, indicating that it was imported from a COM type library.

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

屬性值

如果 true 具有 Type,則為 ComImportAttribute,否則為 falsetrue if the Type has a ComImportAttribute; otherwise, false.

實作

備註

如果目前Type代表建構泛型型別,這個屬性會套用至泛型型別定義從中建構的類型。If the current Type represents a constructed generic type, this property applies to the generic type definition from which the type was constructed. 例如,如果目前Type代表MyGenericType<int>(MyGenericType(Of Integer) Visual Basic 中),這個屬性的值由 MyGenericType<T>.For example, if the current Type represents MyGenericType<int> (MyGenericType(Of Integer) in Visual Basic), the value of this property is determined by MyGenericType<T>.

如果目前Type表示的類型參數的泛型類型或泛型方法定義中這個屬性一律傳回falseIf the current Type represents a type parameter in the definition of a generic type or generic method, this property always returns false.

適用於

另請參閱