This is my code to move files to sharepoint, but not compiling because it says the "CopyStream does not exist in current context". I already have reference to System.dll and the following namespaces:
using System.Security; 
using System.Net; 
using System.Net.Http;
...
public static void MoveFiles(string edifile, string Movetype, string editype, string csvfile)
{
    Uri destUri = new Uri("https://intranet.maxlinear.com/sales/SalesOp/Reports/B2B_POS");
    using (FileStream inStream = File.OpenRead(csvfile))
    {
        WebRequest req = WebRequest.Create(destUri);
        req.Method = "PUT";
        req.Credentials = CredentialCache.DefaultCredentials; // assuming windows Auth
        using (Stream outStream = req.GetRequestStream())                  
        {
            CopyStream(inStream, outStream);              
        }
    }
}
Am I missing anything else? Any help appreciated.
 
    