关于Environment的~
public EnvironmentExample(){
InitializeComponent();
StringBuilder sb = new StringBuilder();
String[] drives = Environment.GetLogicalDrives();
sb.AppendLine("本机逻辑驱动器:" + String.Join(",", drives));
sb.AppendLine("操作系统版本:" + Environment.OSVersion.VersionString);
sb.AppendLine("是否为64位系统:"+Environment.Is64BitOperatingSystem);
sb.AppendLine("计算机名:"+Environment.MachineName);
sb.AppendLine("处理器个数:"+Environment.ProcessorCount);
sb.AppendLine("系统启动后经过的毫秒数:"+Environment .TickCount);
sb.AppendLine("登陆用户名:"+Environment.UserName);
textBox1.Dock = DockStyle.Fill;
textBox1.Multiline = true;
textBox1.ScrollBars = ScrollBars.Both;
textBox1.Select(0, 0);
}
为什么没有显示出来~{:3_58:}
错在哪里~~
抱歉 脑子短路了 忘写textBox1.Text=sb.ToString()了 - -
页:
[1]