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 this question.
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.
Is there a way to find out if my computer's not connected to any network?