RegDeleteValue() private method

private RegDeleteValue ( IntPtr keyHandle, string valueName ) : int
keyHandle System.IntPtr
valueName string
return int
        public void DeleteValue(RegistryKey rkey, string value, bool shouldThrowWhenKeyMissing)
        {
            IntPtr handle = Win32RegistryApi.GetHandle(rkey);
            int    num    = Win32RegistryApi.RegDeleteValue(handle, value);

            if (num == 1018)
            {
                return;
            }
            if (num != 2)
            {
                if (num != 0)
                {
                    this.GenerateException(num);
                }
                return;
            }
            if (shouldThrowWhenKeyMissing)
            {
                throw new ArgumentException("value " + value);
            }
        }