Advertisement
Guest User

Untitled

a guest
Jul 31st, 2014
169
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.39 KB | None | 0 0
  1. int port;
  2.  
  3. while (!isAvailable)
  4. {
  5. port = _rnd.Next(50000, 51000);
  6.  
  7. isAvailable = !(from p in
  8. IPGlobalProperties.GetIPGlobalProperties().GetActiveUdpListeners()
  9. where p.Port == port
  10. select p).Any();
  11. }
  12.  
  13. System.NotSupportedException: This platform is not supported
  14. at System.Net.NetworkInformation.IPGlobalProperties.GetIPGlobalProperties ()
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement