C# 获得网卡参数程序代码
C# 获得网卡参数程序代码如下:public static void NetworkAdapter(out string[] 制造商, out string[] MAC地址)
{
ManagementObjectSearcher searcher = new ManagementObjectSearcher("SELECT * FROM Win32_NetworkAdapter");
制造商 = new string[searcher.Get().Count];
MAC地址 = new string[searcher.Get().Count];
int i = 0;
foreach (ManagementObject share in searcher.Get())
{
try
{
制造商[i] = share.GetPropertyValue("Manufacturer").ToString();
MAC地址[i] = share.GetPropertyValue("MACAddress").ToString();
}
catch (System.Exception er)
{
}
i ;
}
}
补充:软件开发 , C# ,