From 8537a7b05bfa9b6d226481905c8c1b2d336734a1 Mon Sep 17 00:00:00 2001 From: James Groom Date: Wed, 27 Sep 2023 01:30:37 +1000 Subject: [PATCH] Updated C# and .NET docs supplement (markdown) --- C#-and-.NET-docs-supplement.md | 1 + 1 file changed, 1 insertion(+) diff --git a/C#-and-.NET-docs-supplement.md b/C#-and-.NET-docs-supplement.md index a4a1295..3a45444 100644 --- a/C#-and-.NET-docs-supplement.md +++ b/C#-and-.NET-docs-supplement.md @@ -13,6 +13,7 @@ Use `static readonly` and weep. Not allowed, even if they meet the [criteria for unmanaged types](https://learn.microsoft.com/en-us/dotnet/csharp/language-reference/builtin-types/unmanaged-types) and are littered with [explicit layout attributes](https://learn.microsoft.com/en-us/dotnet/standard/native-interop/customize-struct-marshalling). First-class'd structs are no different, so fields of type `ValueTuple`, `Range`, and as noted above, `Span` cannot be `const`. +Also `ref structs`, which makes slightly more sense. That's probably only because you'd be able to get a reference to a `ref struct` on the heap, something which shouldn't exist, by using reflection. ## Deceptive collection type names