How does TryGetNonEnumeratedCount work?
- 5/26/2023
- 3 minute read
TryGetNonEnumeratedCount attempts to determine the number of elements in a sequence without forcing an enumeration. It returns true if it could and false if it couldn't. The API was added with .NET 6 - let's have a look at how that thing works.









