Any clu how we can use get_IsConnectedToInternet
property under C#?
http://msdn.microsoft.com/en-us/library/aa965311(v=vs.85).aspx
Thank you!
Any clu how we can use get_IsConnectedToInternet
property under C#?
http://msdn.microsoft.com/en-us/library/aa965311(v=vs.85).aspx
Thank you!
This is a simplified version of the call.
It tells if you have an internet connection available, not if you are connected.
[DllImport("wininet.dll")]
private extern static bool InternetGetConnectedState( out int Description, int ReservedValue ) ;
public static bool IsConnectedToInternet( )
{
try
{
int Desc;
return InternetGetConnectedState(out Desc, 0);
}
catch
{
return false;
}
}