public void testConnection(SomeCallback onError) { var profiles = Connectivity.ConnectionProfiles; if (profiles.Contains(ConnectionProfile.WiFi)) { Console.WriteLine("YESSSS2"); // Active Wi-Fi connection. } }
public void testConnection(SomeCallback onError) { var profiles = Connectivity.ConnectionProfiles; if (profiles.Contains(ConnectionProfile.WiFi)) { } else { onError(); } }
/// <summary> /// Determines whether the specified callback function returns true for any element of an array. /// </summary> /// <param name="callbackfn">A function that accepts up to three arguments. The some method calls the callbackfn function for each element in the array until the callbackfn returns a value which is coercible to the Boolean value true, or until the end of the array.</param> /// <returns></returns> public bool Some(SomeCallback callbackfn) { for (int index = 0; index < this.Length; index++) { if (!callbackfn(this[index], index, this)) { return(false); } } return(true); }
public void Run(SomeCallback cb, SomeInner inner) { }