How to check internet connection using C# language

Hello guys,
It my frist topic in this forum so i hopeI hope you like it

In this topic we w'll learn how to check internet connection using a simple code.
frist make a new project And add a label and timer .
second Double click on timer to type code .

bool con = Networkinterface.GetIsNetworkAvailable();
if (con == true(
{
lable1.text="your are connect";
}
else
{
label1.text="you are not connected";
}

You can watch the explanation from hereClick Here