public static Type GetGenericCollectionType(Type type) { return GetInterfaceType(type, typeof(ICollection<>)); }