AGENT.Contrib.Reflection.Utilities.IsInterfaceType C# (CSharp) Method

IsInterfaceType() public static method

public static IsInterfaceType ( Type sourceType, Type interfaceType ) : bool
sourceType System.Type
interfaceType System.Type
return bool
        public static bool IsInterfaceType(Type sourceType, Type interfaceType)
        {
            var interfaces = sourceType.GetInterfaces();
            foreach (var i in interfaces)
            {
                if (i == interfaceType) return true;
            }
            return false;
        }