See Also: NetworkReachability Members
You instantiate this class with a hostname or an IP address, and then use the TryGetFlags to get the reachability status. If you want to be notified of changes in the reachability of the specified host, you can use the SetCallback and Schedule methods.
You can detect the ad-hoc WiFi network using the IP address 169.254.0.0 and the general network availability with 0.0.0.0.