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
Historically, we've enforced a nitpicky guideline that when .Count and .Length are available, they should be preferred over .Any() or .Count().
We could write an analyzer that enforces this, but the more that I think about it, the more it seems like this guidance is primarily aimed at avoiding multiple enumerations of IEnumerable. (see #32)
Perhaps we should instead have good analyzers for #32 and instead have a guideline that we should always use the most appropriate of
.Any()
.Count()
.CountIsExactly()
.CountIsAtLeast()
The text was updated successfully, but these errors were encountered:
Historically, we've enforced a nitpicky guideline that when
.Count
and.Length
are available, they should be preferred over.Any()
or.Count()
.We could write an analyzer that enforces this, but the more that I think about it, the more it seems like this guidance is primarily aimed at avoiding multiple enumerations of
IEnumerable
. (see #32)Perhaps we should instead have good analyzers for #32 and instead have a guideline that we should always use the most appropriate of
.Any()
.Count()
.CountIsExactly()
.CountIsAtLeast()
The text was updated successfully, but these errors were encountered: