Globals.RegistryAccess.removeValue C# (CSharp) Method

removeValue() public static method

Used to remove a value from the registry
public static removeValue ( RegistryKey mainKey, string subKey, string valueName ) : bool
mainKey Microsoft.Win32.RegistryKey Windows.Win32.Registry (Halo 2 uses CurrentUser)
subKey string The path to the Label
valueName string The Value Label name to remove
return bool
        public static bool removeValue(RegistryKey mainKey, string subKey, string valueName)
        {
            RegistryKey the_Reg;
            try
            {
                the_Reg = mainKey.CreateSubKey(@subKey);
                the_Reg.DeleteValue(valueName);
                the_Reg.Close();
            }
            catch (Exception e)
            {
                return false;
            }

            return true;
        }