
- C# Basic Tutorial
- C# - Home
- C# - Overview
- C# - Environment
- C# - Program Structure
- C# - Basic Syntax
- C# - Data Types
- C# - Type Conversion
- C# - Variables
- C# - Constants
- C# - Operators
- C# - Decision Making
- C# - Loops
- C# - Encapsulation
- C# - Methods
- C# - Nullables
- C# - Arrays
- C# - Strings
- C# - Structure
- C# - Enums
- C# - Classes
- C# - Inheritance
- C# - Polymorphism
- C# - Operator Overloading
- C# - Interfaces
- C# - Namespaces
- C# - Preprocessor Directives
- C# - Regular Expressions
- C# - Exception Handling
- C# - File I/O
- C# Advanced Tutorial
- C# - Attributes
- C# - Reflection
- C# - Properties
- C# - Indexers
- C# - Delegates
- C# - Events
- C# - Collections
- C# - Generics
- C# - Anonymous Methods
- C# - Unsafe Codes
- C# - Multithreading
- C# Useful Resources
- C# - Questions and Answers
- C# - Quick Guide
- C# - Useful Resources
- C# - Discussion
What are the escape sequences supported by C#?
The following is an example showing how to display some of the escape characters in C# −
Example
using System; using System.Collections.Generic; class Demo { static void Main() { Console.WriteLine("Warning!" + '\u0007'); Console.WriteLine("Test \t Demo Text"); Console.WriteLine("This is it!
This is on the next line!"); } }
For the complete list of escape sequences in C# −
Escape character | Description | Pattern |
---|---|---|
\a | Matches a bell character, \u0007. | \a |
\b | In a character class, matches a backspace, \u0008. | [\b]{3,} |
\t | Matches a tab, \u0009. | (\w+)\t |
\r | Matches a carriage return, \u000D. (\r is not equivalent to the newline character, .) | \r (\w+) |
\v | Matches a vertical tab, \u000B. | [\v]{2,} |
\f | Matches a form feed, \u000C. | [\f]{2,} |
Matches a new line, \u000A. | \r (\w+) | |
\e | Matches an escape, \u001B. | \e |
- Related Articles
- Escape sequences in C
- Escape sequences in Java
- What are the different types of conditional statements supported by C#?
- What are the methods supported by W3C DOM?
- What are the data types supported by JDBC?
- What implicit objects are supported by JSP?
- What are the document methods supported by Legacy DOM?
- What are common HTML Events supported by JavaScript?
- What are the transaction isolation levels supported by JDBC API?
- What are the parameters supported by Get-ChildItem in PowerShell?
- What types of loops are supported in C#?
- How to process escape sequences in a string in Python?
- What are the MySQL Supported Platforms?
- What are all the custom URL schemes supported by the Facebook iPhone app?
- C++11 Features Supported by Intel

Advertisements