From ff9f82d01a0dc71d75605e0258732892e271ed18 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?G=C3=BCnther=20Foidl?= Date: Mon, 28 Apr 2025 10:22:00 +0200 Subject: [PATCH] Don't compare boolean with `false` Alternatively pattern matching `is false` could be used. --- docs/csharp/whats-new/csharp-14.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/csharp/whats-new/csharp-14.md b/docs/csharp/whats-new/csharp-14.md index 1ea242f0f1953..5c2620bea8fb5 100644 --- a/docs/csharp/whats-new/csharp-14.md +++ b/docs/csharp/whats-new/csharp-14.md @@ -37,7 +37,7 @@ public static class Enumerable extension(IEnumerable source) // extension members for IEnumerable { // Extension property: - public bool IsEmpty => source.Any() == false; + public bool IsEmpty => !source.Any(); // Extension indexer: public TSource this[int index] => source.Skip(index).First();