You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
You can have a type that has a Count property and implements IEnumerable but not any of the collection interfaces.
The IReadOnlyCollection interface provides just that.
Currently, Enumerable.TryGetNonEnumeratedCount does not check for IReadOnlyCollection and therefore these types will be fully enumerated when trying to determine the count.
Original Comments
Feedback Bot on 2/27/2024, 09:37 PM:
(private comment, text removed)
The text was updated successfully, but these errors were encountered:
This issue has been moved from a ticket on Developer Community.
You can have a type that has a Count property and implements IEnumerable but not any of the collection interfaces.
The IReadOnlyCollection interface provides just that.
Currently, Enumerable.TryGetNonEnumeratedCount does not check for IReadOnlyCollection and therefore these types will be fully enumerated when trying to determine the count.
Original Comments
Feedback Bot on 2/27/2024, 09:37 PM:
(private comment, text removed)
The text was updated successfully, but these errors were encountered: