GitUI.FormSettings.GetRegistryValue C# (CSharp) Метод

GetRegistryValue() приватный статический Метод

private static GetRegistryValue ( RegistryKey root, string subkey, string key ) : string
root RegistryKey
subkey string
key string
Результат string
        private static string GetRegistryValue(RegistryKey root, string subkey, string key)
        {
            string value = null;
            try
            {
                RegistryKey registryKey = root.OpenSubKey(subkey, false);
                if (registryKey != null)
                {
                    using (registryKey)
                    {
                        value = registryKey.GetValue(key) as string;
                    }
                }
            }
            catch (UnauthorizedAccessException)
            {
                MessageBox.Show("GitExtensions has insufficient permisions to check the registry.");
            }
            return value ?? string.Empty;
        }
FormSettings