HOW TO DELETE A EXISTING SUBKEYS UNDER REGISTRY

Anupam Mishra

Total Post:135

Points:949
Posted by  Anupam Mishra
C#  .NET 
C#
 312  View(s)
Ratings:
Rate this:
I want to delete a  existing subkeys under the root key in my local machine. Please give me a appropriate example to delete a existing subkey.

thank you.
  1. Anupam Mishra

    Post:135

    Points:949
    Re: How to delete a existing subkeys under registry

    Code for delete a existing subkeys:



    using (RegistryKey key = Registry.CurrentUser.OpenSubKey("Anupam Software", true))
                    {
                        if (key == null)
                        { 
                           //Don't need write anything
                        }
                        else
                        {
                            key.DeleteValue("Anupam");
                        }
                    }

      Modified On Jan-21-2016 03:16:38 AM

Answer

NEWSLETTER

Enter your email address here always to be updated. We promise not to spam!