.


:




:

































 

 

 

 


WebClient .




Public WebClient()

, WebClient , . 26.6, , , . , . 26.7 , . WebClient WebException, .

26.6. , WebClient

 

 

 

public string BaseAddress { get; set; }

public RequestCachePolicy CachePolicy { get; set; } public ICredentials Credentials { get; set; }

public Encoding Encoding { get; set; }

 

URI. , , WebClient, , , 1 , .. .

 

 

 

public WebHeaderCollection Headers! get; set; } public bool IsBusy(get; }

public IWebProxy Proxy { get; set; }

,public NameValueCollection QueryString { get; set; }

public WebHeaderCollection ResponseHeaders { get; } public bool

UseDefaultCredentials { get; set; }

 

true, - , false -

, -, . URI ?. , 0

, , . true, , , .. ,

 

26.7. , WebClient

 

 

 

public byte[]

 

UR1,

 

DownloadData(string address)

 

address.

 

public byte[]

 

URI,

 

DownloadData(Uri address)

 

address.

 

Public void

 

URI,

 

DownloadFile(string uri,

 

fileName.

 

string fileName)

 

fileName

 

Public void DownloadFile(Uri

 

URI,

 

address, string fileName)

 

address. fileName

 

Public string

 

URI,

 

DownloadString(string

 

address.

 

address)

 

string

 

Public string

 

URI,

 

DownloadString(Uri address)

 

address. string

 

Public Stream

 

 

OpenRead(string address)

 

URI, address.

 

 

 





:


: 2016-12-03; !; : 402 |


:

:

, .
==> ...

1480 - | 1391 -


© 2015-2024 lektsii.org - -

: 0.01 .