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: 1.0.0.0 (1.0.0.0)
Syntax
C#
public static bool InheritsFrom(
	this Type type,
	Type baseType
)

Parameters

type
Type: SystemType
The Type to see if it inherits from something.
baseType
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