C# Reference Tables

C# Integral Types

Type Size (in bits) Range
sbyte 8 -128 to 127
byte 8 0 to 255
short 16 -32768 to 32767
ushort 16 0 to 65535
int 32 -2147483648 to 2147483647
uint 32 0 to 4294967295
long 64 -9223372036854775808 to 9223372036854775807
ulong 64 0 to 18446744073709551615
char 16 0 to 65535

C# Floating Point\Decimal Types

Type Size(in bits) Precision Range
float 32 7 digits 1.5 x 10-45 to 3.4 x 1038
double 64 15-16 digits 5.0 x 10-324 to 1.7 x 10308
decimal 128 28-29 dc. places 1.0 x 10-28 to 7.9 x 1028

C# Character Escape Sequences

Escape
Sequence
Meaning
\’ Single Quote
\” Double Quote
\\ Backslash
\0 Null, not the same as the C# null value
\a Bell
\b Backspace
\f form Feed
\n Newline
\r Carriage Return
\t Horizontal Tab
\v Vertical Tab

Reference

The C# Station Tutorial-Lesson 02

Leave a Reply

Your email address will not be published. Required fields are marked *