NetworkInterface : NetworkInterface : Network C# Source Code


Custom Search

C# Source Code » Network » NetworkInterface »

 

NetworkInterface








    
 


using System;
using System.Net.NetworkInformation;
class MainClass {
    private static void NetworkAvailabilityChanged(object sender, NetworkAvailabilityEventArgs e) {
        if (e.IsAvailable) {
            Console.WriteLine("Network Available");
        } else {
            Console.WriteLine("Network Unavailable");
        }
    }
    static void Main(string[] args) {
        NetworkChange.NetworkAvailabilityChanged += NetworkAvailabilityChanged;
    }
}

 
    
   
  
   







HTML code for linking to this page:

Follow Navioo On Twitter

C# Source Code

 Navioo Network
» NetworkInterface