Updated C# and .NET docs supplement (markdown)

James Groom 2023-02-08 04:37:09 +10:00
parent d5538a5f63
commit 3e680367e9
1 changed files with 1 additions and 1 deletions

@ -3,7 +3,7 @@ To save us repeating our complaints about the lack of proper documentation under
## Deceptive collection type names
`IReadOnly{Collection,Dictionary,List,Set}` are for getting read-only views of the collections that implement them. They do not mean the collection is immutable (there are [separate classes](https://learn.microsoft.com/en-us/dotnet/api/system.collections.immutable?view=net-6.0) for that).
`IReadOnly{Collection,Dictionary,List,Set}` are for getting read-only views of the collections that implement them. They do not mean the collection is immutable (there are [separate classes](https://learn.microsoft.com/en-us/dotnet/api/system.collections.immutable?view=net-6.0) for that). The same goes for `ReadOnlySpan`.
> Kotlin got this right by calling its interfaces e.g. `List`/`MutableList` instead of `IReadOnlyList`/`IList`. (And it also fixed the inheritance hierarchy.)