I want to read a file from a FTP server without downloading it to a local file. I wrote a function but it does not work:
private string GetServerVersion() {
It is impossible to know what the issue is without details about the error/exception.
At a guess, you do not seem to be assigning a new value to version after the initial declaration
version
string version = "";
Try changing your code to
version = System.Text.Encoding.UTF8.GetString(newFileData);