RegistryKey.CreateSubKey(String value) : RegistryKey « Microsoft.Win32 « C# / C Sharp by API






RegistryKey.CreateSubKey(String value)

 

  using System;
  using System.Resources;
  using Microsoft.Win32;

  using System.Diagnostics;
  class Test
  {
    static void Main(string[] args)
    {
      // Save user prefs to reg.
      RegistryKey regKey = Registry.CurrentUser;
      regKey = regKey.CreateSubKey("Software\\Intertech\\YourKeyRes");
      regKey.SetValue("CurrSize", "29");
      regKey.SetValue("CurrColor", "Red");
      Console.WriteLine("Settings saved in registry");

    }
  }
   

   
  








Related examples in the same category

1.RegistryKey.Close()
2.RegistryKey.GetSubKeyNames()
3.RegistryKey.GetValue
4.RegistryKey.OpenSubKey
5.RegistryKey.SetValue