Thinktecture.Tools.Web.Services.Wscf.Environment.RegistryHelper.DeleteKey C# (CSharp) Method

DeleteKey() public method

public DeleteKey ( string KeyName ) : bool
KeyName string
return bool
        public bool DeleteKey(string KeyName)
        {
            try
            {
                RegistryKey rk = baseRegistryKey ;
                RegistryKey sk1 = rk.CreateSubKey(subKey);

                if ( sk1 == null )
                    return true;
                else
                    sk1.DeleteValue(KeyName);

                return true;
            }
            catch (Exception)
            {
                return false;
            }
        }