Network plugged in at boot

I know this has been covered before but now I can’t seem to find it, so I apologise in advance for the double up. I have a G120 connected to an enc28 on a custom board. It seems fine except it isn’t working if I boot it up with the connected plugged in. How do I “Refresh the interface” at boot up so that it returns true. This is the offending code that is not ran at boot.


static void NetworkChange_NetworkAvailabilityChanged(object sender, NetworkAvailabilityEventArgs e)
        {
            isNetworkAvailable = e.IsAvailable;
            Log.Print(DateTime.UtcNow.ToString("u") + " " + (isNetworkAvailable ? "ONLINE" : "OFFLINE"), 1);
        }

Thanks in advance