gpt4 book ai didi

c# - 我如何在 .net 中获取 cpu 信息?

转载 作者:IT王子 更新时间:2023-10-29 04:49:59 25 4
gpt4 key购买 nike

比如是奔腾还是AMD等

最佳答案

请注意,这是来自 VS2003 的:

using(ManagementObjectSearcher win32Proc = new ManagementObjectSearcher("select * from Win32_Processor"),         
win32CompSys = new ManagementObjectSearcher("select * from Win32_ComputerSystem"),
win32Memory = new ManagementObjectSearcher("select * from Win32_PhysicalMemory"))
{
foreach (ManagementObject obj in win32Proc.Get())
{
clockSpeed = obj["CurrentClockSpeed"].ToString();
procName = obj["Name"].ToString();
manufacturer = obj["Manufacturer"].ToString();
version = obj["Version"].ToString();
}

关于c# - 我如何在 .net 中获取 cpu 信息?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/340359/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com