代码获取计算机硬件信息,代码如下
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Management;
using Microsoft.Win32;
namespace GetHardDiskID_BIOSNumber
{
class Program
{
static void Main(string[] args)
{
//PrintMotherBoardInfo();
Console.WriteLine("主板序号:" + GetMotherBoardSerialNumber());
Console.WriteLine("CPU序列号代码:"+GetCPUMessage());
Console.WriteLine("网卡硬件地址"+GetMacMessage());
GetHardMessage();
Console.Read();
}
/// <summary>打印主板信息
///
/// </summary>
private static void PrintMotherBoardInfo()
{
Manageme