c# - 如何: Create a Key In the Registry (Visual C#)?

标签 c# .net windows registry

我正在使用 C# 在 .NET 框架中开发 Windows 应用程序。在安装应用程序时,我想将某个值写入注册表。

最佳答案

Microsoft.Win32.RegistryKey key;
key = Microsoft.Win32.Registry.CurrentUser.CreateSubKey("Names");
key.SetValue("Name", "Isabella");
key.Close();

http://msdn.microsoft.com/en-us/library/microsoft.win32.registry.aspx

关于c# - 如何: Create a Key In the Registry (Visual C#)?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/9653112/

相关文章:

c# - WPF - 视觉树不用于绘图?

javascript - 防止用户篡改 View 的增量代码

.net - 区分基类的派生类的最佳方法是什么?

python - 如何在 Windows 上通过 Anaconda 安装 OpenCV?

windows - 将 Git 添加到 PATH 变量 - 在 AppData/Local 下找不到 GitHub

windows - 在 Windows 上编译 Erlang 代码

c# - 如何从外部强制异常

c# - 确定已安装的 TrueCrypt 卷的驱动器号

c# - 在 hololens 上创建 txt 文件

c# - 查找所有源硬编码字符串