From 39341178480b5a2b2f8d43bed62ce9678abb1ba2 Mon Sep 17 00:00:00 2001 From: James Groom Date: Thu, 14 Jul 2022 01:43:07 +1000 Subject: [PATCH] Updated Available C# and .NET features (markdown) --- Available-C#-and-.NET-features.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Available-C#-and-.NET-features.md b/Available-C#-and-.NET-features.md index 123dca8..75029df 100644 --- a/Available-C#-and-.NET-features.md +++ b/Available-C#-and-.NET-features.md @@ -90,7 +90,7 @@ static [local methods](https://docs.microsoft.com/en-us/dotnet/csharp/programmin [discards](https://docs.microsoft.com/en-us/dotnet/csharp/fundamentals/functional/discards) | ✔️ | ✔️ | encouraged [`ref` returns/locals](https://docs.microsoft.com/en-us/dotnet/csharp/programming-guide/classes-and-structs/ref-returns) | ✔️ | ✔️ | allowed [expression-bodied ctors](https://docs.microsoft.com/en-us/dotnet/csharp/programming-guide/statements-expressions-operators/expression-bodied-members#constructors) | ✔️ | ✔️ | encouraged -[local methods](https://docs.microsoft.com/en-us/dotnet/csharp/programming-guide/classes-and-structs/local-functions) | ✔️ | ✔️ | encouraged +[local methods](https://docs.microsoft.com/en-us/dotnet/csharp/programming-guide/classes-and-structs/local-functions) | ✔️ | ✔️ | preferred over lambdas/delegates if used multiple times or to unsub from event basic [pattern matching](https://docs.microsoft.com/en-us/dotnet/csharp/fundamentals/functional/pattern-matching) | ✔️ | ✔️ | encouraged [`KeyValuePair.Deconstruct`](https://docs.microsoft.com/en-us/dotnet/api/system.collections.generic.keyvaluepair-2.deconstruct?view=net-6.0) | ⭕ | ⭕ | allowed basic [tuples and destructuring](https://docs.microsoft.com/en-us/dotnet/csharp/language-reference/builtin-types/value-tuples) | ✔️ | ✔️ | encouraged @@ -117,7 +117,7 @@ inline initialisation of [auto-props](https://docs.microsoft.com/en-us/dotnet/cs [`var`](https://docs.microsoft.com/en-us/dotnet/csharp/language-reference/keywords/var) | ✔️ | ✔️ | encouraged [extension methods](https://docs.microsoft.com/en-us/dotnet/csharp/programming-guide/classes-and-structs/extension-methods) | ✔️ | ✔️ | preferred over the same static method w/o `this` param [`Expression` trees](https://docs.microsoft.com/en-us/dotnet/csharp/expression-trees) | ✔️ | ✔️ | discouraged (what are these even for) -[lambdas](https://docs.microsoft.com/en-us/dotnet/csharp/language-reference/operators/lambda-expressions) | ✔️ | ✔️ | encouraged +[lambdas](https://docs.microsoft.com/en-us/dotnet/csharp/language-reference/operators/lambda-expressions) | ✔️ | ✔️ | preferred over delegates LINQ's [query expression syntax](https://docs.microsoft.com/en-us/dotnet/csharp/programming-guide/concepts/linq/query-expression-syntax-for-standard-query-operators) | ✔️ | ✔️ | disallowed [anonymous types](https://docs.microsoft.com/en-us/dotnet/csharp/fundamentals/types/anonymous-types) | ✔️ | ✔️ | disallowed (use tuples) [auto-props](https://docs.microsoft.com/en-us/dotnet/csharp/programming-guide/classes-and-structs/auto-implemented-properties) | ✔️ | ✔️ | encouraged