Skip to content

Commit

Permalink
Clarify L2 identifier names (#38761)
Browse files Browse the repository at this point in the history
* Clarify L2 identifier names

Add an important note regarding L2 identifier names and the official GB18020-2022 standard.

* typo
  • Loading branch information
BillWagner authored Dec 14, 2023
1 parent 98d34e9 commit 9a45845
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions docs/csharp/fundamentals/coding-style/identifier-names.md
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,9 @@ You can declare identifiers that match C# keywords by using the `@` prefix on th

For a complete definition of valid identifiers, see the [Identifiers article in the C# Language Specification](~/_csharpstandard/standard/lexical-structure.md#643-identifiers).

> [!IMPORTANT]
> [The C# language specification](~/_csharpstandard/standard/lexical-structure.md#643-identifiers) only allows letter (Lu, Ll, Lt, Lm, Lo or Nl), digit (Nd), connecting (Pc), combining (Mn or Mc) and formatting (Cf) categories. Anything outside that is automatically replaced using `_`. This may impact certain Unicode characters, including those within the GB18030-2022 Chinese government standard.
## Naming conventions

In addition to the rules, conventions for identifier names are used throughout the .NET APIs. These conventions provide consistency for names, but the compiler doesn't enforce them. You're free to use different conventions in your projects.
Expand Down

0 comments on commit 9a45845

Please sign in to comment.