On this code example:
public void DownloadFile()
string host = "";
string username = "";
string password = "";
string localFileName = System.IO.Path.GetFileName(localFile);
string remoteFileName = "";
using (var sftp = new SftpClient(host, username, password))
using (var file = File.OpenWrite(localFileName))
Isn't the method ".DownloadFile" with the parameters switched? Since the first one is a string and the other is a Stream?
Shouldn't it be the other way around?
Never mind, I was looking at .UpdateFile. Sorry.