Assembly.GetTypes().Where(t => t.GetInterfaces().Contains(typeof (ICustomer)));
This approach is sort of workaround by getting all the interfaces that the Type (
t) inherits and loop thorough them.
Second approach (preferred):
Assembly.GetTypes().Where(t => (typeof(ICustomer)).IsAssignableFrom(t));
Type.IsAssignableFrom is method to determine whether the current Type (
t) can be assigned from an instance of the specified Type (
ICustomer). The specified Type doesn’t have to be an interface.