使用System.Environment获取电脑的相关属性,入门案例,具体内容如下 static void Main(string[] args) { MyComputer myNotebook = new MyComputer(); myNotebook.ComputerInfo(); Console.ReadKey(); } public class MyComputer { private string Domain; private string No; private string User; private string[