Skip to content

Commit

Permalink
Fix escape sequence examples which were missing backslash (dotnet#1065)
Browse files Browse the repository at this point in the history
  • Loading branch information
jskeet authored Mar 28, 2024
1 parent 5c802bc commit 7ae35e3
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions standard/lexical-structure.md
Original file line number Diff line number Diff line change
Expand Up @@ -842,8 +842,8 @@ fragment Hexadecimal_Escape_Sequence
>
> <!-- Example: {template:"standalone-console-without-using", name:"CharacterLiterals", ignoredWarnings:["CS0219"]} -->
> ```csharp
> string good = "x9Good text";
> string bad = "x9Bad text";
> string good = "\x9Good text";
> string bad = "\x9Bad text";
> ```
>
> it might appear at first that the leading character is the same (`U+0009`, a tab character) in both strings. In fact the second string starts with `U+9BAD` as all three letters in the wordBadare valid hexadecimal digits. As a matter of style, it is recommended that `\x` is avoided in favour of either specific escape sequences (`\t` in this example) or the fixed-length `\u` escape sequence.
Expand Down

0 comments on commit 7ae35e3

Please sign in to comment.