Updated Available C# and .NET features (markdown)

YoshiRulz 2024-11-20 04:24:34 +10:00
parent a702b1dcdd
commit bec1c406d7
1 changed files with 10 additions and 0 deletions

@ -23,6 +23,16 @@ I use Standard 2.0 and not Standard 2.1 as the latter is not subsumed by Framewo
Feature | 🔵 `net48` | 🟢 `ns2.0` | convention for main BizHawk solution
--:|:-:|:-:|:--
[prop backing field as `field`](https://learn.microsoft.com/en-us/dotnet/csharp/language-reference/keywords/field) | ✔️ | ✔️ | waiting for .NET 10 LTS
^ C# 14 ^ | 🔵 `net48` | 🟢 `ns2.0` | ---
[`partial` props/indexers](https://learn.microsoft.com/en-us/dotnet/csharp/language-reference/keywords/partial-member) | ✔️ | ✔️️ | waiting for .NET 10 LTS
[`allows ref struct` constraint](https://learn.microsoft.com/en-us/dotnet/csharp/programming-guide/generics/constraints-on-type-parameters#allows-ref-struct) | ❌ | ❌ | unsupported
[interfaces for `ref struct`s](https://learn.microsoft.com/en-us/dotnet/csharp/language-reference/builtin-types/ref-struct#restrictions-for-ref-struct-types-that-implement-an-interface) | ✔️ | ✔️️ | discouraged (very useless)
[`ref struct`s and `unsafe` in state-machine methods](https://learn.microsoft.com/en-us/dotnet/csharp/whats-new/csharp-13#ref-and-unsafe-in-iterators-and-async-methods) | ? | ? | unsupported
[an escape for ESC](https://learn.microsoft.com/en-us/dotnet/csharp/programming-guide/strings/#string-escape-sequences) | ✔️ | ✔️️ | waiting for .NET 10 LTS
[`lock ((Lock) l)` sugar](https://learn.microsoft.com/en-us/dotnet/csharp/language-reference/statements/lock) | ⭕ | ⭕️ | should be able to use polyfill w/ C# 12
[enhanced `params`](https://learn.microsoft.com/en-us/dotnet/csharp/language-reference/keywords/method-parameters#params-modifier) | ✔️ | ✔️️ | waiting for .NET 10 LTS
^ C# 13 ^ | 🔵 `net48` | 🟢 `ns2.0` | ---
[`[InlineArray]`](https://learn.microsoft.com/en-us/dotnet/csharp/language-reference/builtin-types/struct#inline-arrays) | ❌ | ❌ | unsupported
[`using` aliases](https://learn.microsoft.com/en-us/dotnet/csharp/language-reference/keywords/using-directive#using-alias) for tuples, etc. | ✔️ | ✔️ | disallowed (use a struct instead of a tuple alias and we'll consider replacing them with `<Using/>` later)
[default arguments for lambdas](https://learn.microsoft.com/en-us/dotnet/csharp/language-reference/operators/lambda-expressions#input-parameters-of-a-lambda-expression) | ✔️ | ✔️ | discouraged (you should be using local methods)