WikiFunctions.RegistryUtils.GetValue C# (CSharp) Method

GetValue() public static method

Gets a string value from an AWB registry subkey
public static GetValue ( string keyNameSuffix, object defaultValue ) : string
keyNameSuffix string
defaultValue object
return string
        public static string GetValue(string keyNameSuffix, object defaultValue)
        {
            string wantedKey = keyNameSuffix.Substring(keyNameSuffix.LastIndexOf("\\"));
            RegistryKey regKey = Registry.CurrentUser.OpenSubKey(BuildKeyName(keyNameSuffix.Replace(wantedKey, "")));
            return (regKey != null) ? regKey.GetValue(wantedKey.Replace("\\", ""), defaultValue).ToString() : "";
        }