title: How do I know if my computer's not connected to a network?
body: <p>I'm making a LAN chat application (server and client program) and I wanted to know how can I get my own computer's IP address (for the server program) and found <a href="https://stackoverflow.com/questions/1069103/how-to-get-my-own-ip-address-in-c">this question</a>.</p>
  
  <p>I used the code in my program and tested it while my computer's not connected to the internet, to a LAN or any external devices and I thought that the code will throw an exception because of that (and would mean that my computer's not connected any network)... but it didn't and instead, it returned an IP Address.</p>
  
  <p>Is there a way to find out if my computer's not connected to any network?</p>