The topic you requested is included in another documentation set. For convenience, it's displayed below. Choose Switch to see the topic in its original location.
DownloadProgressChangedEventArgs::BytesReceived Property
.NET Framework (current version)
Gets the number of bytes received.
Assembly: System (in System.dll)
To determine what percentage of the transfer has occurred, use the ProgressPercentage property.
The following code example shows an implementation of a handler for the DownloadProgressChanged event. The method displays the value of this property.
static void UploadProgressCallback(Object^ sender, UploadProgressChangedEventArgs^ e) { // Displays the operation identifier, and the transfer progress. Console::WriteLine("{0} uploaded {1} of {2} bytes. {3} % complete...", (String ^)e->UserState, e->BytesSent, e->TotalBytesToSend, e->ProgressPercentage); } static void DownloadProgressCallback(Object^ sender, DownloadProgressChangedEventArgs^ e) { // Displays the operation identifier, and the transfer progress. Console::WriteLine("{0} downloaded {1} of {2} bytes. {3} % complete...", (String ^)e->UserState, e->BytesReceived, e->TotalBytesToReceive, e->ProgressPercentage); }
.NET Framework
Available since 2.0
Silverlight
Available since 2.0
Windows Phone Silverlight
Available since 7.0
Available since 2.0
Silverlight
Available since 2.0
Windows Phone Silverlight
Available since 7.0
Show: