Click or drag to resize

ReflectionUtilitiesInheritsFrom Method

Checks if a Type Inherits from another Type.

Namespace:  DustProductions.Core
Assembly:  DustProductions.Core (in DustProductions.Core.dll) Version: (
public static bool InheritsFrom(
	this Type type,
	Type baseType


Type: SystemType
The Type to see if it inherits from something.
Type: SystemType
The Type to see if it is in the inheritance tree.

Return Value

Type: Boolean
True if "type" inherits from "baseType".

Usage Note

In Visual Basic and C#, you can call this method as an instance method on any object of type Type. When you use instance method syntax to call this method, omit the first parameter. For more information, see Extension Methods (Visual Basic) or Extension Methods (C# Programming Guide).
See Also