'How to access property of Renci.SshNet.ForwardedPortRemote in C# with Visual Studio
In the immediate window of Visual Studio, with C#, after writing the word port, I am getting this one:
port
{Renci.SshNet.ForwardedPortRemote}
BoundHost: "123.45.67.89"
BoundHostAddress: {123.45.67.89}
BoundPort: 4222
Host: "123.45.67.89"
HostAddress: {123.45.67.89}
IsStarted: true
Port: 4222
Question - how to display the value of BoundPort on the console? I have tried this:
Console.WriteLine($"Trying port {port}.");
But then of course, I am getting only the class name.
Console.WriteLine($"Trying port {port["BoundPort"]}.");
does not compile.
Sources
This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.
Source: Stack Overflow
| Solution | Source |
|---|
