Faced such a problem, I want to pull out only the name of the Internet connection, I do this:
NetworkInterface[] interfaces = NetworkInterface.GetAllNetworkInterfaces(); foreach (NetworkInterface adapter in interfaces) { Console.WriteLine (adapter.Name); } And I get as many as 3 lines, the second is the real name of the connection, I only need it. Here is what data comes in:
Подключение по локальной сети 12 Интертелеком MS TCP Loopback interface You need to get only the name, i.e. Intertelecom help please!