How to

delete a windows registry key

Published: 12. January 2009 | Updated: 26. October 2011
License: Microsoft Public License (MS-PL)
Categories: Windows » Registry
Tags: C# Windows
Was this snippet helpful for you? YESYES / NONO

Import namespace

using Microsoft.Win32;

Code

using (RegistryKey key = Registry.LocalMachine.CreateSubKey(@"SOFTWARE\MyApplication"))
{
    key.DeleteSubKey("FormSize");
}
Send us feedback about this snippet »



Related Snippets: