Skip to Main Content
C# 5.0. Leksykon kieszonkowy. Wydanie III
book

C# 5.0. Leksykon kieszonkowy. Wydanie III

by Joseph Albahari, Ben Albahari
September 2013
Intermediate to advanced content levelIntermediate to advanced
208 pages
5h 19m
Polish
Helion
Content preview from C# 5.0. Leksykon kieszonkowy. Wydanie III

Typy liczbowe

W języku C# zdefiniowano następujące typy liczbowe:

Typ C#

Synonim w przestrzeni nazw System

Przyrostek literału

Rozmiar

Zakres wartości

Typy całkowitoliczbowe ze znakiem

sbyte

Sbyte

 

8 bitów

–27 do 27–1

short

Int16

 

16 bitów

–215 do 215–1

int

Int32

 

32 bity

–231 do 231–1

long

Int64

L

64 bity

–263 do 263–1

Typy całkowitoliczbowe bez znaku

byte

Byte

 

8 bitów

0 do 28–1

ushort

UInt16

 

16 bitów

0 do 216–1

uint

UInt32

U

32 bity

0 do 232–1

ulong

UInt64

UL

64 bity

0 do 264–1

Typy rzeczywiste

float

Single

F

32 bity

±(~10–45 do ~1038)

double

Double

D

64 bity

±(~10–324 do ~10308)

decimal

Decimal

M

128 bitów

±(~10–28 do ~1028)

Wśród typów całkowitych najbardziej „pełnoprawnymi” typami są int i long — są one preferowane w C# oraz środowisku wykonawczym. Pozostałe typy całkowitoliczbowe są zazwyczaj ...

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

Reinventing the Organization for GenAI and LLMs

Reinventing the Organization for GenAI and LLMs

Ethan Mollick

Publisher Resources

ISBN: 9781457178559