title: UDP port open check
body: <p>What is the best way to check if the UDP port is open or not on the same machine. I have got port number <code>7525UDP</code> and if it's open I would like to bind to it. I am using this code: </p>
  
  <pre><code>while (true) 
  { 
  
    try {socket.bind()}
  
    catch (Exception ex) 
  
    {MessageBox.Show("socket probably in use");}
  }
  </code></pre>
  
  <p>but is there a specified function that can check if the UDP port is open or not. Without sweeping the entire table set for UDP ports would be also good.</p>