C-sharpAsk
This site contains all the question regarding c#sharp and dot-net
Saturday, January 8, 2011
Get file size before downloading using webclient
System.Net
.
WebClient
wc =
new
System.Net
.
WebClient
();
wc.
OpenRead
(
"http://patrickkroft.com/mp3/Pearl.mp3"
);
Int64
bytes_total=
Convert
.
ToInt64
( wc.
ResponseHeaders
[
"
Content
-
Length
"
]);
MessageBox.
Show
(bytes_total.ToString() +
" Bytes"
);
No comments:
Post a Comment
Newer Post
Older Post
Home
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment