using System; namespace zero.Core.Extensions { public static class ObjectExtensions { public static bool Is(this Type type) { return type.IsAssignableFrom(typeof(T)); } public static bool Is(this object obj) { return obj.GetType().IsAssignableFrom(typeof(T)); } } }