I am kind of new to C# but pretty familiar with the concepts of exception handling.
I am using the UdpClient class and occasionally, the local port remains bound because the connection wasn’t closed properly.
When this occurs, the statement
UdpClient udpC= new UdpClient(Port);
throws an exception that I can catch but have found no way to force the system to continue execution beyond the catch/try block.
I realize catch/try is meant to be a terminal situation, but I cannot (easily) find a way to check for a bound port before calling the constructor.
Any help would be appreciated.