C# 獲得主板序列號程序代碼如下:
public static void MainboardSerialNumber(out string[] 序列號)
{
ManagementObjectSearcher searcher = new ManagementObjectSearcher("Select * From Win32_BIOS");
序列號 = new string[searcher.Get().Count];
int i = 0;
foreach (ManagementObject share in searcher.Get())
{
序列號[i] = share.GetPropertyValue("SerialNumber").ToString();
i ;
}
}