TypeExtensions¶
Namespace:
SideXP.Core
Extension functions for Type instances.
Methods¶
Inherits(Type, Type)¶
Checks if a given type inherits from a given parent type. Note that if the given type is the same as the expected parent type, this function will return false, as it's not true that the given type inherits from itself.
Parameters
type: The type to check.parent: The expected parent type.
Returns
Returns true if the given type inherits from the parent type.
Inherits<TParent>(Type)¶
Checks if a given type inherits from a given parent type. Note that if the given type is the same as the expected parent type, this function will return false, as it's not true that the given type inherits from itself.
Type parameters
TParent
Returns
Returns true if the given type inherits from the parent type.
Is(Type, Type)¶
Checks if a given type is or inherits from a given parent type.
Parameters
type: The type to check.parent: The expected parent type.
Returns
Returns true if the given type is or inherits from the parent type.
Is<TParent>(Type)¶
Checks if a given type is or inherits from a given parent type.
Type parameters
TParent
Parameters
type: The type to check.
Returns
Returns true if the given type is or inherits from the parent type.