我将在c#中检查我的Windows操作系统名称(Windows 8 Pro)但是它出错了,出了什么问题?
RegistryKey reg = Registry.LocalMachine.OpenSubKey(@"HKLM\SOFTWARE\Microsoft\Windows NT\CurrentVersion", true);
string currentKey;
currentKey = reg.GetValue("ProductName", true).ToString();
textBox1.Text = currentKey;
Run Code Online (Sandbox Code Playgroud) c# ×1