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

TypeExtensions

public static class TypeExtensions
Provides extension methods for reflection.
public static string GetDisplayName(this Type type)

Gets a human readable type name (e.g. DictionaryOfStringAndObject).

public static Type GetEnumerableItemType(this Type type)

Gets the type of the array item.

public static bool InheritsFromTypeName(this Type type, string typeName, TypeNameStyle typeNameStyle)

Checks whether the given type inherits from the given type name.

public static bool IsAssignableToTypeName(this CachedType type, string typeName, TypeNameStyle typeNameStyle)

Checks whether the given type is assignable to the given type name.

public static bool IsAssignableToTypeName(this Type type, string typeName, TypeNameStyle typeNameStyle)

Checks whether the given type is assignable to the given type name.