In this example,we’ll learn How to use tab space in C#.
private void button1_Click(object sender, EventArgs e)
string name = textBox1.Text;
string age = textBox2.Text;
listBox1.Items.Add(name + " " + age);
listBox2.Items.Add(name + "\t" + age);
Here’s the full list of escape characters for C#:
\' for a single quote.
\" for a double quote.
\\ for a backslash.
\0 for a null character.
\a for an alert character.
\b for a backspace.
\f for a form feed.
\n for a new line.
\r for a carriage return.
\t for a horizontal tab.
\v for a vertical tab.
\uxxxx for a unicode character hex value (e.g.
\x is the same as
\u, but you don’t need leading zeroes (e.g.
\Uxxxxxxxx for a unicode character hex value (longer form needed for generating surrogates).