WebClient.OpenWrite : WebClient « System.Net « C# / C Sharp by API






WebClient.OpenWrite

 
using System;
using System.IO;
using System.Net;

public class OpenWriteTest
{
   public static void Main(string[] argv)
   {
      WebClient wc = new WebClient();
      string data = "Data up upload to server";

      Stream strm = wc.OpenWrite(argv[0]);
      StreamWriter sw = new StreamWriter(strm);

      sw.WriteLine(data);
      sw.Close();
      strm.Close();
   }
}

   
  








Related examples in the same category

1.WebClient.BaseAddress
2.WebClient.Credentials
3.WebClient.DownloadData
4.WebClient.DownloadFile
5.WebClient.DownloadString(Uri u)
6.WebClient.Headers
7.WebClient.OpenRead(String url)
8.WebClient.ResponseHeaders
9.WebClient.UploadData
10.WebClient.UploadValues