public void TestGetAdapters()
        {
            var adapters = NetworkAdapterManager.GetAdapters();

            foreach (var adapter in adapters)
            {
                Console.WriteLine($"{adapter.ProductName}\t{adapter.Description}");
            }
        }
Ejemplo n.º 2
0
        public void TestEnable()
        {
            var adapters = NetworkAdapterManager.GetAdapters();

            if (!adapters.Any())
            {
                return;
            }

            foreach (var adapter in adapters)
            {
                NetworkAdapterManager.Enable(adapter);
            }
        }