Class TypeExtensions
This static class that provides extension methods for the Type class.
Inheritance
object
TypeExtensions
Namespace: Primitively
Assembly: Primitively.Abstractions.dll
Syntax
public static class TypeExtensions
Remarks
This class provides the method IsAssignableTo(Type, Type) which is missing from .NET Standard.
Methods
IsAssignableTo(Type, Type)
Determines whether an instance of the current Type can be assigned to a variable of the specified targetType.
Declaration
public static bool IsAssignableTo(this Type type, Type targetType)
Parameters
Type | Name | Description |
---|---|---|
Type | type | The current type. |
Type | targetType | The type to compare with the current type. |
Returns
Type | Description |
---|---|
bool |
|