diff --git a/_rules/1800.md b/_rules/1800.md index 21e73073..de602176 100644 --- a/_rules/1800.md +++ b/_rules/1800.md @@ -5,5 +5,3 @@ title: Consider using `Any()` to determine whether an `IEnumerable` is empty severity: 3 --- When a member or local function returns an `IEnumerable` or other collection class that does not expose a `Count` property, use the `Any()` extension method rather than `Count()` to determine whether the collection contains items. If you do use `Count()`, you risk that iterating over the entire collection might have a significant impact (such as when it really is an `IQueryable` to a persistent store). - -**Note:** If you return an `IEnumerable` to prevent changes from calling code as explained in [{{ site.default_rule_prefix }}1130](/member-design-guidelines#{{ site.default_rule_prefix }}1130), and you're developing in .NET 4.5 or higher, consider the new read-only classes.