C# 0 The Complete Reference



Download 4,07 Mb.
Pdf ko'rish
bet1026/1096
Sana23.01.2022
Hajmi4,07 Mb.
#402171
1   ...   1022   1023   1024   1025   1026   1027   1028   1029   ...   1096
Bog'liq
C-Sharp 3 The Complete Reference Herbert Schildt

GetResponse( )

 on the 


WebRequest

 object. After 

the request has been sent, 

GetResponse( )

 waits for a response. Once a response has been 

received, 

GetResponse( )

 returns a 



WebResponse

 object that encapsulates the response. 

This object is assigned to 

resp

. Since, in this case, the response uses the HTTP protocol, the 

result is cast to 

HttpWebResponse

. Among other things, the response contains a stream that 

can be used to read data from the URI.

Next, an input stream is obtained by calling 



GetResponseStream( )

 on 


resp

. This is a 

standard 

Stream

 object, having all of the attributes and features of any other input stream. 

A reference to the stream is assigned to 

istrm

. Using 


istrm

, the data at the specified URI can 

be read in the same way that a file is read.

Next, the program reads the data from McGraw-Hill.com and displays it on the screen. 

Because there is a lot of information, the display pauses every 400 characters and waits for 

you to press 

ENTER

. This way the first part of the information won’t simply scroll off the 



www.freepdf-books.com


830

 

P a r t   I I :  



E x p l o r i n g   t h e   C #   L i b r a r y

screen. Notice that the characters are read using 



ReadByte( )

. Recall that this method returns 

the next byte from the input stream as an 


Download 4,07 Mb.

Do'stlaringiz bilan baham:
1   ...   1022   1023   1024   1025   1026   1027   1028   1029   ...   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