Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- int port;
- while (!isAvailable)
- {
- port = _rnd.Next(50000, 51000);
- isAvailable = !(from p in
- IPGlobalProperties.GetIPGlobalProperties().GetActiveUdpListeners()
- where p.Port == port
- select p).Any();
- }
- System.NotSupportedException: This platform is not supported
- at System.Net.NetworkInformation.IPGlobalProperties.GetIPGlobalProperties ()
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement