Redigeeri

Jagamisviis:


C# special characters

Special characters are predefined, contextual characters that modify the program element (a literal string, an identifier, or an attribute name) that follows them.

The C# language reference documents the most recently released version of the C# language. It also contains initial documentation for features in public previews for the upcoming language release.

The documentation identifies any feature first introduced in the last three versions of the language or in current public previews.

Tip

To find when a feature was first introduced in C#, consult the article on the C# language version history.

C# supports the following special characters:

  • @, the verbatim identifier character.
  • $, the interpolated string character.
  • """, a sequence of three or more " characters that provides the delimiters for a raw string literal.
  • _, a _ character that represents a discard, which is a placeholder for an unused variable.

This section only includes tokens that aren't operators. For all operators, see the operators section.