Open sandboxFocus

Property ItemType

ItemType

Gets the type of items being enumerated.

Declaration
public IType ItemType { get; }
Property Value
Type Description
IType

The item type. For example, for a method returning IEnumerable<int>, this property returns int. For non-generic enumerable types like IEnumerable, this property returns object.

Exceptions
Type Condition
InvalidOperationException

Thrown when EnumerableKind is None.