C#是如何读写注册表的?

AiQun 2002-07-12 11:33:35
C#是如何读写注册表的,除了系统信息外,如何读写呢?
...全文
536 5 打赏 收藏 转发到动态 举报
写回复
用AI写文章
5 条回复
切换为时间正序
请发表友善的回复…
发表回复
pursuer 2002-07-12
  • 打赏
  • 举报
回复
写:
RegistryKey rkey = Registry.LocalMachine;
//The second parameter tells it to open the key as writable
RegistryKey rkey1 = rkey.OpenSubKey("Software",true);
RegistryKey rkey2 = rkey1.CreateSubKey("baoTest");
rkey2.SetValue("Name",textBox1.Text);
rkey2.Close();
rkey1.Close();
读:
RegistryKey rkey = Registry.LocalMachine;
//The second parameter tells it to open the key as writable
RegistryKey rkey1 = rkey.OpenSubKey("Software\\baoTest",true);
textBox2.Text=rkey1.GetValue("Name").ToString();
aspcn 2002-07-12
  • 打赏
  • 举报
回复
http://www.ccidnet.com/tech/guide/2001/11/26/58_3786.html
http://www.ccidnet.com/html/tech/guide/2001/11/30/92_3843.html
aspcn 2002-07-12
  • 打赏
  • 举报
回复
http://www.ccidnet.com/tech/guide/2001/11/26/58_3786.html
http://www.ccidnet.com/html/tech/guide/2001/11/30/92_3843.html
molester 2002-07-12
  • 打赏
  • 举报
回复
http://www.chinabs.net/csharp/default.asp?infoid=28
molester 2002-07-12
  • 打赏
  • 举报
回复
http://www.chinabs.net/csharp/default.asp?infoid=16

111,126

社区成员

发帖
与我相关
我的任务
社区描述
.NET技术 C#
社区管理员
  • C#
  • Creator Browser
  • by_封爱
加入社区
  • 近7日
  • 近30日
  • 至今
社区公告

让您成为最强悍的C#开发者

试试用AI创作助手写篇文章吧