try this
using (var file = File.OpenRead(localFileName))
{
Console.WriteLine("\rUploading --> " + remoteFileName);
Console.WriteLine("started at " + DateTime.Now+ "");
var asynch = sftp.BeginUploadFile(file1, remoteDirectoryInvoiceFileName);
var sftpAsynch = asynch as SftpUploadAsyncResult;
while (!sftpAsynch.IsCompleted)
{
Console.Write(String.Format("\rUploaded {0} of {1}.", sftpAsynch.UploadedBytes, file.Length));
}
sftp.EndUploadFile(asynch);
Console.WriteLine("Ended at " + (DateTime.Now ) + "");
}