<PackageReference Include="Namotion.Reflection" Version="3.5.1" />

Namotion.Reflection.EnumerableExtensions

public static class EnumerableExtensions
IEnumerable extensions.
public static T FirstAssignableToTypeNameOrDefault<T>(this IEnumerable<T> objects, string typeName, TypeNameStyle typeNameStyle = 1)

Tries to get the first object which is assignable to the given type name.

public static IEnumerable<T> GetAssignableToTypeName<T>(this IEnumerable<T> objects, string typeName, TypeNameStyle typeNameStyle = 1)

Tries to get the first object which is assignable to the given type name.

public static Type GetCommonBaseType(this IEnumerable<Type> types)

Finds the first common base type of the given types.