Braintique.com header
Left Navigation Bar

Using Control Characters

The backslash (\) is a special control character, also called the escape character. The character after the backslash has a special meaning, as shown in the table.

Character

Meaning

\0

Null

\b

Backspace

\t

Tab

\r

Carriage return

\n

New line

\v

Vertical tab

\f

Form feed

\u, \x

A single Unicode character when followed by a four-digit hexadecimal number

\"

Double quote

\'

Single quote

\\

Backslash

                         

The escape sequences \u or \x are used (interchangeably) to specify a single Unicode character. For example, \x03A9 and \u03A9 both mean the Greek letter capital omega. The escape sequences \x03A3 and \u03A3 will appear as the Greek letter capital sigma, as in this example, in which a button displays a capital sigma as its text when it is clicked:

private void btnDoIt_Click(object sender,
System.EventArgs e)
{
char chr = '\u03A3';
btnDoIt.Text = chr.ToString();
}

You can find a complete list of the Unicode character sets and their four-digit hexadecimal representations at www.unicode.org/charts/.

Previous Table of Contents Next


Google
 
Web www.braintique.com
www.digitalfieldguide.com www.googleplexblog.com


Home | Barticles | Blogs | Books | Services | FAQ | Contact

© Braintique.com. All rights reserved.

Search Engine Optimization







RSS 2.0 Syndication feed

Syndication Viewer

Our Web host:
IX WebHosting



Food for Your Brain! Get a Barticle! Questions Answered Books for You What We Can Do For You Contact Us Brain Food Questions Answered Books for You What We Can Do For You Frequently Asked Questions About Us Google Research Photoshop Wi-Fi and Wireless Networking The Natural Way to Write