enumerate network interfaces
Published: 22. January 2009 | Updated: 22. January 2009License: Microsoft Public License (MS-PL)
Categories: Network
Tags: C# Network Windows
Import namespace
using System.Net.NetworkInformation;
Code
NetworkInterface[] interfaces = NetworkInterface.GetAllNetworkInterfaces(); foreach (NetworkInterface n in interfaces) { Console.WriteLine("{0} - {1}", n.Name, n.Description); }
| Send us feedback about this snippet » |





