Quote Originally Posted by steve1_rm View Post
Is there anyway I can ignore all these connections I am not interested in listening out for, and just listen on the LAN and Wireless?

Code:
private void Form1_Load(object sender, EventArgs e)
        {
            NetworkChange.NetworkAvailabilityChanged += new NetworkAvailabilityChangedEventHandler(OnNetworkChangedEvent);   
        }

        private void OnNetworkChangedEvent(object sender, NetworkAvailabilityEventArgs e)
        {
            bool available = e.IsAvailable;

            NetworkInterface[] networkConnections = NetworkInterface.GetAllNetworkInterfaces();

            foreach (NetworkInterface ni in networkConnections)
            {
                if (ni.Name == "Local Area Connection")
                {
                    if (ni.OperationalStatus == OperationalStatus.Down)
                    {
                        Console.WriteLine("LAN disconnected: " + ni.Description);
                    }
                }
                else if (ni.Name == "Wireless Network Connection")
                {
                    if (ni.OperationalStatus == OperationalStatus.Down)
                    {
                        Console.WriteLine("Wireless disconnected: " + ni.Description);
                    }
                }
            }
        }
I am not really sure what you need. I believe that your code does what you want, to check only the LAN and wireless connection.