So I'm trying to be smart about this but it looks like this idea is quite dumb on account of I'm getting a stack overflow exception right off the bat.
Ideally, I would like for CheckInternetStatus to run whenever I use the IsConnected flag.
How can I accomplish this correctly? Or is this just not a good idea at all?
public static class Internet
{
public static bool IsConnected
{
get
{
CheckInternetStatus();
return IsConnected;
}
set
{
IsConnected = value;
}
}
}
Additional Information: CheckInternetStatus updates IsConnected