当前位置:编程学习 > C#/ASP.NET >>

C# 获得主板参数程序代码

C# 获得主板参数程序代码如下:
public static void Mainboard(out string[] 制造商, out string[] 型号)
{
        ManagementObjectSearcher searcher = new ManagementObjectSearcher("SELECT * FROM Win32_BaseBoard");
        制造商 = new string[searcher.Get().Count];
        型号 = new string[searcher.Get().Count];
        int i = 0;
        foreach (ManagementObject share in searcher.Get())
        {
                制造商[i] = share.GetPropertyValue("Manufacturer").ToString();
                型号[i] = share.GetPropertyValue("Product").ToString();
                i ;
        }
}
补充:软件开发 , C# ,
CopyRight © 2022 站长资源库 编程知识问答 zzzyk.com All Rights Reserved
部分文章来自网络,