I am using following code to check if my app is connected to internet
try
{
using (var client = new WebClient())
using (client.OpenRead("http://google.com/generate_204"))
return true;
}
catch
{
return false;
}
I want to check the connectivity of specific network adapter. for example I have two internet connections. one is connected through WiFi and other one through ethernet cable both are from different ISP. I only want to check the connectivity of Ethernet. someone suggested socket.bind(). But I don't know how to use webclint() with socket.bind() kindly help with example