using System;
using System.IO;
using System.Net;
public class CSharpLab
{ public static void Test()
{ string userName = "ftpAccount";
string password = "ftpPassword";
string uploadUrl = "ftp://myFtpServerHost/someFolder/test.txt";
byte[] data = new byte[] { 0x31, 0x32, 0x33 }; WebClient wc = new WebClient();
wc.Credentials = new NetworkCredential(userName, password);
wc.UploadData(uploadUrl, data);
}
}