how to develop small app to windows ce ,to know network availability in device using c#
( i am copying my answer to a similar question here )
Look in the registry key
HKLM\system\state\connections, there is are entries for each of the possible network types, for instance:
When connected to a wireless network:
[HKLM\system\state\Connections\Network] Adapters="BCMSDDHD1" Count=dword:00000001 Descriptions="Business World"
when connected to activesync:
[HKLM\system\state\Connections\Desktop] Adapters="" Count=dword:00000001 Descriptions="CurrentDTPTNetwork"
Count value under
HKLM\system\state\connections gives you the total number of active connections.
HKLM\system\state\Hardware you can find the current power state of the various devices.
HttpWebRequest, and try connecting to Google: