Skip to Content
C# 3.0: kurz & gut
book

C# 3.0: kurz & gut

by Joseph Albahari, Ben Albahari
May 2008
Intermediate to advanced content levelIntermediate to advanced
248 pages
3h 50m
German
O'Reilly Verlag
Content preview from C# 3.0: kurz & gut

Strings und Zeichen

Der C#-Typ char (ein Alias des Typs System.Char) repräsentiert ein Unicode-Zeichen und nimmt zwei Byte ein. Ein char-Literal wird innerhalb von einfachen Anführungszeichen angegeben:

char c = 'A';       // einfaches Zeichen

Escape-Sequenzen geben Zeichen an, die nicht direkt ausgedrückt oder interpretiert werden können. Eine Escape-Sequenz ist ein Backslash, gefolgt von einem Zeichen mit einer bestimmten Bedeutung:

char newLine = '\n';
char backSlash = '\\';

Folgende Zeichen sind in einer Escape-Sequenz möglich.

Zeichen

Bedeutung

Wert

\'

einfaches Anführungszeichen

0x0027

\"

doppeltes Anführungszeichen

0x0022

\\

Backslash

0x005C

\0

null

0x0000

\a

Alert

0x0007

\b

Backspace

0x0008

\f

Seitenvorschub

0x000C

\n

New Line

0x000A

\r

Carriage Return

0x000D

\t

horizontaler Tab ...

Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Start your free trial

You might also like

How I Built a Personal Board of Directors With GenAI

How I Built a Personal Board of Directors With GenAI

Vipin Gupta
How to Become a Game-Changing Leader

How to Become a Game-Changing Leader

Douglas A. Ready, Alan Mulally
What Successful Project Managers Do

What Successful Project Managers Do

W. Scott Cameron, Jeffrey S. Russell, Edward J. Hoffman, Alexander Laufer

Publisher Resources

ISBN: 9783897215443