System.Net.WebClient.OpenWriteAsync C# (CSharp) Method

OpenWriteAsync() public method

public OpenWriteAsync ( System address ) : void
address System
return void
        public void OpenWriteAsync(System.Uri address) { }
        public void OpenWriteAsync(System.Uri address, string method) { }

Same methods

WebClient::OpenWriteAsync ( System address, string method ) : void
WebClient::OpenWriteAsync ( System address, string method, object userToken ) : void

Usage Example

Esempio n. 1
1
 private void UploadFile(string fileName, Stream data)
 {
     UriBuilder ub = new UriBuilder("/Image/UploadFile");
     ub.Query = string.Format("filename={0}", fileName);
     WebClient c = new WebClient();
     c.OpenWriteCompleted += (sender, e) =>
         {
             PushData(data, e.Result);
             e.Result.Close();
             data.Close();
         };
     c.OpenWriteAsync(ub.Uri);
 }
All Usage Examples Of System.Net.WebClient::OpenWriteAsync