Home > DeveloperSection > Forums > How to delete a existing subkeys under registry
Anupam Mishra

Total Post:135

Points:949
Posted on    January-21-2016 1:51 AM

 C# C#  .NET 
Ratings:


 1 Reply(s)
 152  View(s)
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.


Anupam Mishra

Total Post:135

Points:949
Posted on    January-21-2016 3:14 AM

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

Don't want to miss updates? Please click the below button!

Follow MindStick