Updated Available C# and .NET features (markdown)
parent
e33a8f9751
commit
3934117848
|
@ -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
|
[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
|
[`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
|
[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
|
basic [pattern matching](https://docs.microsoft.com/en-us/dotnet/csharp/fundamentals/functional/pattern-matching) | ✔️ | ✔️ | encouraged
|
||||||
[`KeyValuePair<K, V>.Deconstruct`](https://docs.microsoft.com/en-us/dotnet/api/system.collections.generic.keyvaluepair-2.deconstruct?view=net-6.0) | ⭕ | ⭕ | allowed
|
[`KeyValuePair<K, V>.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
|
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
|
[`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
|
[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)
|
[`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
|
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)
|
[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
|
[auto-props](https://docs.microsoft.com/en-us/dotnet/csharp/programming-guide/classes-and-structs/auto-implemented-properties) | ✔️ | ✔️ | encouraged
|
||||||
|
|
Loading…
Reference in New Issue