diff --git a/ICD.Common.Utils/Extensions/TypeExtensions.cs b/ICD.Common.Utils/Extensions/TypeExtensions.cs index eaa3cca..239b5f9 100644 --- a/ICD.Common.Utils/Extensions/TypeExtensions.cs +++ b/ICD.Common.Utils/Extensions/TypeExtensions.cs @@ -162,6 +162,19 @@ namespace ICD.Common.Utils.Extensions .Assembly; } + /// + /// Returns true if the type is assignable to the given type. + /// + /// + /// + public static bool IsAssignableTo(this Type from) + { + if (from == null) + throw new ArgumentNullException("from"); + + return from.IsAssignableTo(typeof(T)); + } + /// /// Returns true if the type is assignable to the given type. ///