上传者: 38730201
|
上传时间: 2022-09-06 09:36:26
|
文件大小: 93KB
|
文件类型: PDF
常用的两种方法
方法一:
using Microsoft.Win32;
RegistryKey keyCom = Registry.LocalMachine.OpenSubKey(Hardware//DeviceMap//SerialComm);
if (keyCom != null)
{
string[] sSubKeys = keyCom.GetValueNames();
foreach (string sName in sSubKeys)
{
string sValue = (string)keyCom.GetValue(sName);
this.textBox1.