Expand Minimize

Type::IsAbstract Property

Gets a value indicating whether the Type is abstract and must be overridden.

Namespace:  System
Assembly:  mscorlib (in mscorlib.dll)

public:
virtual property bool IsAbstract {
	bool get () sealed;
}

Property Value

Type: System::Boolean
true if the Type is abstract; otherwise, false.

Implements

_Type::IsAbstract

The IsAbstract property returns true in the following cases:

  • The current type is abstract; that is, it cannot be instantiated, but can only serve as the base class for derived classes. In C#, abstract classes are marked with the abstract (C# Reference) keyword; in Visual Basic, they are marked with the MustInherit (Visual Basic) keyword.

  • The current type is an interface.

If the current Type represents a type parameter in the definition of a generic type or generic method, this property always returns false.

The following example creates an array of Type objects that represent the following types:contains type returns true if the specified object is abstract; otherwise, it returns false.

  • AbstractClass, an abstract class (a class marked as abstract in C# and MustInherit in Visual Basic).

  • DerivedClass, a class that inherits from AbstractClass.

  • SingleClass, a non-inheritable class. It is defined as sealed in C# and NotInheritable in Visual Basic.

  • ITypeInfo, an interface.

  • ImplementingClass, a class that implements the ITypeInfo interface.

The method returns true only for AbstractClass, the abstract class, and ITypeInfo, the interface.

No code example is currently available or this language may not be supported.

.NET Framework

Supported in: 4.6, 4.5, 4, 3.5, 3.0, 2.0, 1.1, 1.0

.NET Framework Client Profile

Supported in: 4, 3.5 SP1

Portable Class Library

Supported in: Portable Class Library

Supported in: Windows Phone 8.1

Supported in: Windows Phone Silverlight 8.1

Supported in: Windows Phone Silverlight 8

Windows Phone 8.1, Windows Phone 8, Windows 8.1, Windows Server 2012 R2, Windows 8, Windows Server 2012, Windows 7, Windows Vista SP2, Windows Server 2008 (Server Core Role not supported), Windows Server 2008 R2 (Server Core Role supported with SP1 or later; Itanium not supported)

The .NET Framework does not support all versions of every platform. For a list of the supported versions, see .NET Framework System Requirements.

Was this page helpful?
(1500 characters remaining)
Thank you for your feedback
Show:
© 2014 Microsoft