C# 0 The Complete Reference


C#’s I/O Is Built Upon Streams



Download 4,07 Mb.
Pdf ko'rish
bet472/1096
Sana23.01.2022
Hajmi4,07 Mb.
#402171
1   ...   468   469   470   471   472   473   474   475   ...   1096
Bog'liq
C-Sharp 3 The Complete Reference Herbert Schildt

C#’s I/O Is Built Upon Streams

C# programs perform I/O through streams. A 



stream

 is an abstraction that either produces or 

consumes information. A stream is linked to a physical device by the I/O system. All streams 

behave in the same manner, even if the actual physical devices they are linked to differ. Thus, 

the I/O classes and methods can be applied to many types of devices. For example, the same 

methods that you use to write to the console can also be used to write to a disk file.



Byte Streams and Character Streams

At the lowest level, all C# I/O operates on bytes. This makes sense because many devices are 

byte oriented when it comes to I/O operations. Frequently, though, we humans prefer to 

communicate using characters. Recall that in C#, 



char

 is a 16-bit type, and 



byte

 is an 8-bit type. 

If you are using the ASCII character set, then it is easy to convert between 


Download 4,07 Mb.

Do'stlaringiz bilan baham:
1   ...   468   469   470   471   472   473   474   475   ...   1096




Ma'lumotlar bazasi mualliflik huquqi bilan himoyalangan ©hozir.org 2024
ma'muriyatiga murojaat qiling

kiriting | ro'yxatdan o'tish
    Bosh sahifa
юртда тантана
Боғда битган
Бугун юртда
Эшитганлар жилманглар
Эшитмадим деманглар
битган бодомлар
Yangiariq tumani
qitish marakazi
Raqamli texnologiyalar
ilishida muhokamadan
tasdiqqa tavsiya
tavsiya etilgan
iqtisodiyot kafedrasi
steiermarkischen landesregierung
asarlaringizni yuboring
o'zingizning asarlaringizni
Iltimos faqat
faqat o'zingizning
steierm rkischen
landesregierung fachabteilung
rkischen landesregierung
hamshira loyihasi
loyihasi mavsum
faolyatining oqibatlari
asosiy adabiyotlar
fakulteti ahborot
ahborot havfsizligi
havfsizligi kafedrasi
fanidan bo’yicha
fakulteti iqtisodiyot
boshqaruv fakulteti
chiqarishda boshqaruv
ishlab chiqarishda
iqtisodiyot fakultet
multiservis tarmoqlari
fanidan asosiy
Uzbek fanidan
mavzulari potok
asosidagi multiservis
'aliyyil a'ziym
billahil 'aliyyil
illaa billahil
quvvata illaa
falah' deganida
Kompyuter savodxonligi
bo’yicha mustaqil
'alal falah'
Hayya 'alal
'alas soloh
Hayya 'alas
mavsum boyicha


yuklab olish