操作注册表
Registry.CurrentUser.CreateSubKey("Software\\Microsoft\\MyKey");
RegistryKey rk = Registry.CurrentUser.OpenSubKey("Software\\Microsoft\\MyKey", true);
rk.SetValue("姓名", "小芳");
rk.SetValue("年龄", "28");
string r = rk.GetValue("年龄").ToString();
rk.DeleteValue("年龄");
System.Console.WriteLine(r);
Registry.CurrentUser.DeleteSubKey("Software\\Microsoft\\MyKey");
rk.Close();