Use escape sequences in strings in CSharp
Description
The following code shows how to use escape sequences in strings.
Example
/*from ww w. jav a 2 s. c om*/
using System;
public class StrDemo {
public static void Main() {
Console.WriteLine("Line One\nLine Two\nLine Three");
Console.WriteLine("One\tTwo\tThree");
Console.WriteLine("Four\tFive\tSix");
// embed quotes
Console.WriteLine("\"Why?\", he asked.");
}
}
The code above generates the following result.