diff --git a/ScriptCore/Extensions/TypeExtension.cs b/ScriptCore/Extensions/TypeExtension.cs new file mode 100644 index 0000000..b6fc91a --- /dev/null +++ b/ScriptCore/Extensions/TypeExtension.cs @@ -0,0 +1,18 @@ +using System; +using System.Collections.Generic; +using System.Text; + +namespace GlitchyEngine.Extensions; + +public static class TypeExtension +{ + /// + /// Determines whether the current type can be assigned to a variable of the specified . + /// + /// The type to compare with the current type. + /// + public static bool IsAssignableTo(this Type type, Type targetType) + { + return targetType.IsAssignableFrom(type); + } +}