Gets the type's generic collection type if it implements IEnumerable{T}, or otherwise the type itself. If the resulting type is nullable, the underlying type is returned.

public static Type SingleUnderlyingType(PropertyInfo propertyInfo)
Returns:
Type

Parameters

propertyInfo PropertyInfo

The property info object to return the single underlying type for.

In this article