[杂笔屋]如何获取主板序列号
![](https://images.cnblogs.com/OutliningIndicators/ContractedBlock.gif)
private static string GetBIOSNumber()
{
ManagementObjectSearcher searcher = new ManagementObjectSearcher("Select SerialNumber From Win32_BIOS");
string biosNumber = string.Empty;
foreach (ManagementObject mgt in searcher.Get())
{
biosNumber += mgt["SerialNumber"].ToString();
}
return biosNumber;
}
{
ManagementObjectSearcher searcher = new ManagementObjectSearcher("Select SerialNumber From Win32_BIOS");
string biosNumber = string.Empty;
foreach (ManagementObject mgt in searcher.Get())
{
biosNumber += mgt["SerialNumber"].ToString();
}
return biosNumber;
}
System.Management