private static void TryGetSwitchOverridePartial(string switchName, ref bool overrideFound, ref bool overrideValue) { string text = null; overrideFound = false; if (!AppContextDefaultValues.s_errorReadingRegistry) { text = AppContextDefaultValues.GetSwitchValueFromRegistry(switchName); } if (text == null) { text = CompatibilitySwitch.GetValue(switchName); } bool flag; if (text != null && bool.TryParse(text, out flag)) { overrideValue = flag; overrideFound = true; } }