mirror of
https://github.com/turusudiro/SteamEmuUtility.git
synced 2026-02-08 10:01:19 +01:00
25 lines
523 B
C#
25 lines
523 B
C#
namespace InternetCommon
|
|
{
|
|
public class Internet
|
|
{
|
|
public static bool IsInternetAvailable()
|
|
{
|
|
try
|
|
{
|
|
using (var client = new System.Net.WebClient())
|
|
{
|
|
using (var stream = client.OpenRead("http://www.google.com"))
|
|
{
|
|
return true;
|
|
}
|
|
}
|
|
}
|
|
catch
|
|
{
|
|
return false;
|
|
}
|
|
}
|
|
}
|
|
|
|
}
|