Class TypeExtensions
Extension methods for
Inheritance
Namespace: X10D.Reflection
Assembly: X10D.dll
Syntax
public static class TypeExtensions : object
Methods
| Improve this Doc View SourceImplements(Type, Type)
Returns a value indicating whether the current type implements a specified interface.
Declaration
public static bool Implements(this Type value, Type interfaceType)
Parameters
Type | Name | Description |
---|---|---|
Type | value | The type whose interface list to check. |
Type | interfaceType | The interface type. |
Returns
Type | Description |
---|---|
System.Boolean | true if the current exists on the type; otherwise, false. |
Implements<T>(Type)
Returns a value indicating whether the current type implements a specified interface.
Declaration
public static bool Implements<T>(this Type value)
Parameters
Type | Name | Description |
---|---|---|
Type | value | The type whose interface list to check. |
Returns
Type | Description |
---|---|
System.Boolean | true if the current exists on the type; otherwise, false. |
Type Parameters
Name | Description |
---|---|
T | The interface type. |
Inherits(Type, Type)
Returns a value indicating whether the current type inherits a specified type.
Declaration
public static bool Inherits(this Type value, Type type)
Parameters
Type | Name | Description |
---|---|---|
Type | value | The type whose interface list to check. |
Type | type | The base type. |
Returns
Type | Description |
---|---|
System.Boolean | true if the current type inherits |
Inherits<T>(Type)
Returns a value indicating whether the current type inherits a specified type.
Declaration
public static bool Inherits<T>(this Type value)
where T : class
Parameters
Type | Name | Description |
---|---|---|
Type | value | The type whose interface list to check. |
Returns
Type | Description |
---|---|
System.Boolean | true if the current type inherits |
Type Parameters
Name | Description |
---|---|
T | The base type. |