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

定义

获取一个值,该值指示 Type 是否应用了 ComImportAttribute 属性,如果应用了该属性,则表示它是从 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.

适用于

另请参阅