diff --git a/C#-and-.NET-docs-supplement.md b/C#-and-.NET-docs-supplement.md index 8cd4419..806c240 100644 --- a/C#-and-.NET-docs-supplement.md +++ b/C#-and-.NET-docs-supplement.md @@ -1,5 +1,5 @@ To save us repeating our complaints about the lack of proper documentation under each section, let's agree to gather all the frustration here: -> AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA +> AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA Contribute to [the official docs](https://github.com/dotnet/docs) if possible. @@ -32,6 +32,11 @@ Use `MSBuildProjectDirectory`. Note that the latter doesn't include a trailing s `dotnet list BizHawk.sln package --outdated` will list outdated ``s +## NUL-terminated strings + +.NET will happily include NUL (`(char) 0`) in a string if you use `String..ctor(char[])`. +WinForms' `Label.Text` stops reading at the first NUL for measurement/rendering, at least under Mono. + ## `String.GetHashCode` stability The `GetHashCode` implementation for strings does not reflect the string's contents, and as such, the hash not stable between program instances.