waiter = new (false) Ĭlient.DownloadDataCompleted += new DownloadDataCompletedEventHandler(DownloadDataCallback) Public static void DownloadDataInBackground(string address) Sample call : DownLoadDataInBackground ("") can perform other tasks while waiting for the download to complete. Specify that the DownloadDataCallback method gets calledĬlient->DownloadDataCompleted += gcnew DownloadDataCompletedEventHandler( DownloadDataCallback ) Ĭlient->DownloadDataAsync( uri, waiter ) System::Threading::AutoResetEvent^ waiter = gcnew System::Threading::AutoResetEvent( false ) Void DownloadDataInBackground( String^ address ) The following code example demonstrates setting an event handler for this event. public:Įvent System::Net::DownloadDataCompletedEventHandler ^ DownloadDataCompleted public event ? DownloadDataCompleted public event DownloadDataCompleted member this.DownloadDataCompleted : Public Custom Event DownloadDataCompleted As DownloadDataCompletedEventHandler Public Event DownloadDataCompleted As DownloadDataCompletedEventHandler Event Type DownloadDataCompletedEventHandler Examples Occurs when an asynchronous data download operation completes.
0 Comments
Leave a Reply. |