Finish improvements to "String Escape Sequences" section of "Strings (C# Programming Guide)" page #13310
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Make Unicode escapes more consistent with recent improvements made to https://docs.microsoft.com/en-us/dotnet/fsharp/language-reference/strings :
Moved
\vrow up to be just under\t. This move provides for a more logical grouping of the escape sequences: simple, static ones first, followed by the dynamic Unicode escape sequences that require a user-supplied value. I think having this grouping will make the list more readable for most readers, which I feel is more important than maintaining strict alphabetical ordering of the list. The\vjust seemed out of place between\uand\x, and if someone is looking for a Unicode escape sequence, I believe it helps to have those all together.Switched order of
\uand\Uso that\ucould come first as that, again, seems to flow better / be a more logical progression.Changed character used for hex digit placeholder in escape sequence from
ntoH, as again, I feel it is more readable / more intuitive that "H" refers to "Hex" whereas "n" is ambiguous as "number"? And, it has more visual clarity since the lower-case "n" blends in a bit with "u" (at least to me it does).Added range for all user-supplied values (why make readers hunt elsewhere for that info, especially when
\Uis not as obvious as the other two?).Added generic format for
\xChange example code point / character for
\uand\xto something a little more interesting than "A" :-)Added missing example permutation of
\xFor more details, please visit: https://bit.ly/UnicodeEscapeSequences