◆ GetEnumerableElementType()

static Type GetEnumerableElementType ( this Type  collectionType)
static
Parameters
collectionTypeA type of an IEnumerable, for which we want to know the elements of.
Returns
The type of the elements, as specified in the type's generic IEnumerable interface. Returns
typeof(object)
, when the type does not implement a generic version of IEnumerable
Exceptions
ArgumentExceptionThrown when the type passed in does not implement IEnumerable