Click or drag to resize

ExtensionsReflectionImplementsInterface Method (TypeInfo, Type)

Checks if the type has implemented the defined interface

Namespace:  Cauldron
Assembly:  Cauldron.Activator (in Cauldron.Activator.dll) Version: 3.2.0.1 (3.2.0.1)
Syntax
C#
public static bool ImplementsInterface(
	this TypeInfo typeInfo,
	Type typeOfInterface
)

Parameters

typeInfo
Type: System.ReflectionTypeInfo
The type that may implements the interface typeOfInterface
typeOfInterface
Type: SystemType
The type of interface to look for

Return Value

Type: Boolean
True if the typeInfo has implemented the interface typeOfInterface

Usage Note

In Visual Basic and C#, you can call this method as an instance method on any object of type TypeInfo. 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).
Exceptions
ExceptionCondition
ArgumentException The type typeOfInterface is not an interface
See Also