using Microsoft.Win32; namespace ReCodeItLib.Utils; public static class RegistryHelper { /// /// Sets a key in the registry, given its key, value, and kind /// /// /// /// public static void SetRegistryValue(string key, string value, RegistryValueKind kind) { var regKey = Registry.CurrentUser.CreateSubKey(@"SOFTWARE\ReCodeIt"); regKey.SetValue(key, value, kind); } /// /// Gets a key from the registry, given its key and type /// /// /// /// public static T? GetRegistryValue(string key) { var regKey = Registry.CurrentUser.OpenSubKey(@"SOFTWARE\ReCodeIt"); return (T)regKey.GetValue(key); } }