Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR CSHARP

check if internet is connected with c# winforms

[System.Runtime.InteropServices.DllImport("wininet.dll")]
private extern static bool InternetGetConnectedState(out int Description, int ReservedValue);

public static bool CheckNet()
{
     int desc;
     return InternetGetConnectedState(out desc, 0);         
}
Source by stackoverflow.com #
 
PREVIOUS NEXT
Tagged: #check #internet #connected #winforms
ADD COMMENT
Topic
Name
7+1 =