If I create a socket using
var socket = new UdpClient(0,AddressFamily.InterNetwork);
How do I then find the port of the socket?
I'm probably being daft, but I'm not having luck in MSDN/Google (probably because it is 4:42 on a Friday and the sun is shining).
Background:
What I want to do is find an open port, and then report to another process to forward messages to me on that port. There may be multiple clients, so I don't want to used a fixed port.
Thanks.