This project is read-only.

Error Display in VB.NET

Jul 14, 2012 at 7:06 AM

Hey everybody,

So in the documentation, I see how to display errors in C#, but no mention of other languages. I'm writing a program in VB.NET, and I need to know how to display the feedback from the console. Can someone please explain?

P.S. here's the C# for it, if that helps at all...

using (var client = new SshClient("host", "username", "password"))
{
    client.Connect();
    var cmd = client.CreateCommand(";");
    cmd.Execute();
    if (!string.IsNullOrEmpty(cmd.Error))
    {
        Console.WriteLine(cmd.Error);
    }
    client.Disconnect();
}

Jul 21, 2012 at 1:23 AM

Hi,

 

I am not a VB person so can't help you there, but since its .NET library it should not be so much different.

 

Thanks,

Oleg