IEnumerable<T>.GetNonEnumeratedCount Method

Definition

Attempts to determine the number of elements in the sequence without forcing an enumeration.

Delphi
function GetNonEnumeratedCount: Integer

Returns

Integer

When this method returns, contains the number of elements, or -1 if the count couldn't be determined without enumeration.

Remarks

This method is primarily for internal use to provide count based results as efficient as possible.