private bool IsUserSetting(SettingsProperty setting) {
bool isUser = setting.Attributes[typeof(UserScopedSettingAttribute)] is UserScopedSettingAttribute;
bool isApp = setting.Attributes[typeof(ApplicationScopedSettingAttribute)] is ApplicationScopedSettingAttribute;
if (isUser && isApp) {
throw new ConfigurationErrorsException(SR.GetString(SR.BothScopeAttributes));
}
else if (!(isUser || isApp)) {
throw new ConfigurationErrorsException(SR.GetString(SR.NoScopeAttributes));
}
return isUser;
}