Check out example codes for "check connection c#". It will help you in understanding the concepts better.
Code Example 1
public static bool CheckForInternetConnection()
{
try
{
using (var client = new WebClient())
using (client.OpenRead("http://google.com/generate_204"))
return true;
}
catch
{
return false;
}
}
Code Example 2
System.Net.NetworkInformation.NetworkInterface.GetIsNetworkAvailable()
Learn ReactJs, React Native from akashmittal.com