From ff2a2e6dd3f9d6ced5ea581c6f726eb550c7126c Mon Sep 17 00:00:00 2001 From: YoshiRulz Date: Wed, 30 Jul 2025 02:23:02 +1000 Subject: [PATCH] Banning init props in Hawk --- Available-C#-and-.NET-features.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Available-C#-and-.NET-features.md b/Available-C#-and-.NET-features.md index fdffbfa..ea18415 100644 --- a/Available-C#-and-.NET-features.md +++ b/Available-C#-and-.NET-features.md @@ -84,7 +84,7 @@ basic [function pointers](https://docs.microsoft.com/en-us/dotnet/csharp/languag [pattern matching](https://docs.microsoft.com/en-us/dotnet/csharp/language-reference/operators/patterns#logical-patterns) III | ✔️ | ✔️ | encouraged [unindented `Main`](https://docs.microsoft.com/en-us/dotnet/csharp/fundamentals/program-structure/top-level-statements) | ✔️ | N/A | N/A (neither executable uses it) [`with` for records](https://docs.microsoft.com/en-us/dotnet/csharp/language-reference/operators/with-expression) | ✔️ | ✔️ | encouraged when records are used -[`init`](https://docs.microsoft.com/en-us/dotnet/csharp/language-reference/keywords/init) | ⭕ | ⭕ | discouraged +[`init`](https://docs.microsoft.com/en-us/dotnet/csharp/language-reference/keywords/init) | ⭕ | ⭕ | disallowed (since such accessors can write to `readonly` fields) [`record class`](https://docs.microsoft.com/en-us/dotnet/csharp/language-reference/builtin-types/record) | ✔️ | ✔️ | discouraged ^ C# 9 ^ | 🔵 `net48` | 🟢 `ns2.0` | --- `@$""` (instead of `$@""`) | ✔️ | ✔️ | disallowed