I am trying to write a simple file upload/download for communication with an sftp server. looking at the sharpsshtransfertests.cs routine, the lines I cannot figure out are:
sshCp.OnTransferStart += new FileTransferEvent(sshCp_OnTransferStart);
sshCp.OnTransferProgress += new FileTransferEvent(sshCp_OnTransferProgress);
sshCp.OnTransferEnd += new FileTransferEvent(sshCp_OnTransferEnd);
I am not familiar with c# so I don't understand the syntax or how to convert it to vb.net
any help would be appreciated
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
sshCp.OnTransferStart += New FileTransferEvent(AddressOf sshCp_OnTransferStart)
sshCp.OnTransferProgress += New FileTransferEvent(AddressOf sshCp_OnTransferProgress)
sshCp.OnTransferEnd += New FileTransferEvent(AddressOf sshCp_OnTransferEnd)
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
I am trying to write a simple file upload/download for communication with an sftp server. looking at the sharpsshtransfertests.cs routine, the lines I cannot figure out are:
sshCp.OnTransferStart += new FileTransferEvent(sshCp_OnTransferStart);
sshCp.OnTransferProgress += new FileTransferEvent(sshCp_OnTransferProgress);
sshCp.OnTransferEnd += new FileTransferEvent(sshCp_OnTransferEnd);
I am not familiar with c# so I don't understand the syntax or how to convert it to vb.net
any help would be appreciated
You are more likely to get help using a library that is updated semi-regularly, such as: https://sshnet.codeplex.com/discussions
I went to http://www.developerfusion.com/tools/convert/csharp-to-vb/ and it converted the code to VB as follows:
sshCp.OnTransferStart += New FileTransferEvent(AddressOf sshCp_OnTransferStart)
sshCp.OnTransferProgress += New FileTransferEvent(AddressOf sshCp_OnTransferProgress)
sshCp.OnTransferEnd += New FileTransferEvent(AddressOf sshCp_OnTransferEnd)