Description: If you want to automatically detect whether a connection is established outside the network, you can try this
To Search:
File list (Check if you may need any files):
TestInternetConnection
......................\WindowsFormsApplication1
......................\........................\bin
......................\........................\...\Debug
......................\........................\...\.....\Error.html
......................\........................\...\.....\WindowsFormsApplication1.exe
......................\........................\...\.....\WindowsFormsApplication1.pdb
......................\........................\...\.....\WindowsFormsApplication1.vshost.exe
......................\........................\...\.....\WindowsFormsApplication1.vshost.exe.manifest
......................\........................\...\Release
......................\........................\Error.html
......................\........................\Form1.cs
......................\........................\Form1.Designer.cs
......................\........................\Form1.resx
......................\........................\Images
......................\........................\InternetConnection.cs
......................\........................\InternetConnection.Designer.cs
......................\........................\obj
......................\........................\...\Debug
......................\........................\...\.....\TempPE
......................\........................\...\.....\......\Properties.Resources.Designer.cs.dll
......................\........................\...\.....\WindowsFormsApplication1.csproj.FileListAbsolute.txt
......................\........................\...\.....\WindowsFormsApplication1.csproj.GenerateResource.Cache
......................\........................\...\.....\WindowsFormsApplication1.exe
......................\........................\...\.....\WindowsFormsApplication1.Form1.resources
......................\........................\...\.....\WindowsFormsApplication1.pdb
......................\........................\...\.....\WindowsFormsApplication1.Properties.Resources.resources
......................\........................\...\Release
......................\........................\Program.cs
......................\........................\Properties
......................\........................\..........\AssemblyInfo.cs
......................\........................\..........\Resources.Designer.cs
......................\........................\..........\Resources.resx
......................\........................\..........\Settings.Designer.cs
......................\........................\..........\Settings.settings
......................\........................\WindowsFormsApplication1.csproj
......................\........................\WindowsFormsApplication1.csproj.user
......................\WindowsFormsApplication1.sln