I have the below code that was working fine until I tried adding the bool NetworkAvailable = true
portion. Now I get a Method name expected
compile time exception at Line 4 below.
void NetworkStatus_AvailabilityChanged(object sender, NetworkStatusChangedArgs e)
{
var networkAvailable = e.IsAvailable;
SetUpdateHUDConnectedMode d = new SetUpdateHUDConnectedMode(UpdateHUDConnectedMode(networkAvailable));
this.Invoke(d);
}
delegate void SetUpdateHUDConnectedMode(bool NetworkAvailable = true);
private void UpdateHUDConnectedMode(bool NetworkAvailable = true)
{
...
}
I am, admittedly, new to Delegates
and Optional Parameters
so I would be grateful for any insight. Thanks.