C# 0 The Complete Reference


System.IO  is included. This namespace is needed because the information from the  website is read using a  Stream



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

System.IO

 is included. This namespace is needed because the information from the 

website is read using a 

Stream

 object.


The program begins by creating a 

WebRequest

 object that contains the desired URI. 

Notice that the 

Create( )

 method, rather than a constructor, is used for this purpose. 



Create( )

is a 


static

 member of 



WebRequest

. Even though 



WebRequest

 is an abstract class, it is still 

possible to call a 

static

 method of that class. 



Create( )

 returns a 



WebRequest

 object that has 

the proper protocol “plugged in,” based on the protocol prefix of the URI. In this case, the 

protocol is HTTP. Thus, 



Create( )

 returns an 



HttpWebRequest

 object. Of course, its return 

value must still be cast to 

HttpWebRequest

 when it is assigned to the 



HttpWebRequest

reference called 



req

. At this point, the request has been created, but not yet sent to the 

specified URI.

To send the request, the program calls 




Download 4,07 Mb.

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