I'm using this code:
NetworkInformation.NetworkInterface[] interfaces = NetworkInformation.NetworkInterface.GetAllNetworkInterfaces();
the abo开发者_运维技巧ve code retrieving only the active network connections, I need of all. How I do this? Thanks in advance. :)
using System.Management;   
    ManagementObjectSearcher query = new ManagementObjectSearcher(   
        "SELECT * FROM Win32_NetworkAdapterConfiguration" );   
    ManagementObjectCollection queryCollection = query.Get();   
    foreach (ManagementObject mo in queryCollection)   
    {   
        Console.WriteLine(mo["Description"].ToString());
    }   
Edit:
to find all others ["Properties"] name, change the foreach like this:
foreach (ManagementObject mo in queryCollection) 
            {
                foreach (PropertyData pd in mo.Properties)
                {
                    Console.WriteLine(pd.Name);
                }
            } 
 
         
                                         
                                         
                                         
                                        ![Interactive visualization of a graph in python [closed]](https://www.devze.com/res/2023/04-10/09/92d32fe8c0d22fb96bd6f6e8b7d1f457.gif) 
                                         
                                         
                                         
                                         加载中,请稍侯......
 加载中,请稍侯......
      
精彩评论