Code:
/ Dotnetfx_Vista_SP2 / Dotnetfx_Vista_SP2 / 8.0.50727.4016 / DEVDIV / depot / DevDiv / releases / whidbey / NetFxQFE / ndp / fx / src / Configuration / System / Configuration / KeyValueInternalCollection.cs / 1 / KeyValueInternalCollection.cs
//------------------------------------------------------------------------------ //// Copyright (c) Microsoft Corporation. All rights reserved. // //----------------------------------------------------------------------------- namespace System.Configuration { using System; using System.Xml; using System.Configuration; using System.Collections.Specialized; using System.Collections; using System.IO; using System.Text; // class AppSettingsSection class KeyValueInternalCollection : NameValueCollection { private AppSettingsSection _root = null; public KeyValueInternalCollection(AppSettingsSection root) { _root = root; foreach (KeyValueConfigurationElement element in _root.Settings) { base.Add(element.Key, element.Value); } } public override void Add(String key, String value) { _root.Settings.Add(new KeyValueConfigurationElement(key, value)); base.Add(key, value); } public override void Clear() { _root.Settings.Clear(); base.Clear(); } public override void Remove(string key) { _root.Settings.Remove(key); base.Remove(key); } #if DONT_COMPILE // Unfortunately this is not virtual and we hand out the base collection public new string this[string key] { get { return base[key]; } set { _root.Settings[key] = new KeyValueConfigurationElement(key, value); base[key] = value; } } #endif } } // File provided for Reference Use Only by Microsoft Corporation (c) 2007. //------------------------------------------------------------------------------ //// Copyright (c) Microsoft Corporation. All rights reserved. // //----------------------------------------------------------------------------- namespace System.Configuration { using System; using System.Xml; using System.Configuration; using System.Collections.Specialized; using System.Collections; using System.IO; using System.Text; // class AppSettingsSection class KeyValueInternalCollection : NameValueCollection { private AppSettingsSection _root = null; public KeyValueInternalCollection(AppSettingsSection root) { _root = root; foreach (KeyValueConfigurationElement element in _root.Settings) { base.Add(element.Key, element.Value); } } public override void Add(String key, String value) { _root.Settings.Add(new KeyValueConfigurationElement(key, value)); base.Add(key, value); } public override void Clear() { _root.Settings.Clear(); base.Clear(); } public override void Remove(string key) { _root.Settings.Remove(key); base.Remove(key); } #if DONT_COMPILE // Unfortunately this is not virtual and we hand out the base collection public new string this[string key] { get { return base[key]; } set { _root.Settings[key] = new KeyValueConfigurationElement(key, value); base[key] = value; } } #endif } } // File provided for Reference Use Only by Microsoft Corporation (c) 2007.
Link Menu

This book is available now!
Buy at Amazon US or
Buy at Amazon UK
- SqlInternalConnectionSmi.cs
- UnicastIPAddressInformationCollection.cs
- HTTPNotFoundHandler.cs
- EventLogPermission.cs
- NativeWindow.cs
- ZipIOEndOfCentralDirectoryBlock.cs
- OutputScopeManager.cs
- Translator.cs
- InputLanguageProfileNotifySink.cs
- OraclePermission.cs
- FontInfo.cs
- AssociationTypeEmitter.cs
- ObjectDataSource.cs
- ContextMenuService.cs
- UnmanagedMarshal.cs
- DriveNotFoundException.cs
- ConnectionPointGlyph.cs
- _FtpControlStream.cs
- WebPartDisplayMode.cs
- AvtEvent.cs
- SqlProcedureAttribute.cs
- DataServiceRequest.cs
- AudioException.cs
- DesignTimeVisibleAttribute.cs
- CachedFontFamily.cs
- PageCatalogPart.cs
- DataGridViewCellCancelEventArgs.cs
- Camera.cs
- ListItemCollection.cs
- CodeMethodInvokeExpression.cs
- EncoderNLS.cs
- EditorServiceContext.cs
- ForceCopyBuildProvider.cs
- HandlerWithFactory.cs
- LoadItemsEventArgs.cs
- RegexStringValidatorAttribute.cs
- HttpCacheVaryByContentEncodings.cs
- PolicyUtility.cs
- ColorInterpolationModeValidation.cs
- DependencyObjectType.cs
- ControlCollection.cs
- XmlIterators.cs
- BaseCollection.cs
- RotateTransform.cs
- StyleHelper.cs
- QueryOptionExpression.cs
- ZipPackagePart.cs
- WebServicesDescriptionAttribute.cs
- CustomPopupPlacement.cs
- Publisher.cs
- SQLInt16Storage.cs
- VBCodeProvider.cs
- DataControlCommands.cs
- EntityContainerAssociationSet.cs
- StylusSystemGestureEventArgs.cs
- TableLayoutStyleCollection.cs
- RectangleGeometry.cs
- ProfileWorkflowElement.cs
- EncodingNLS.cs
- querybuilder.cs
- PropertyContainer.cs
- CertificateManager.cs
- RenamedEventArgs.cs
- SystemColorTracker.cs
- VersionUtil.cs
- Compensate.cs
- SessionSwitchEventArgs.cs
- SchemaTypeEmitter.cs
- Compress.cs
- TextView.cs
- MarshalDirectiveException.cs
- JsonXmlDataContract.cs
- ImageIndexConverter.cs
- RoutedCommand.cs
- StateManagedCollection.cs
- InputLanguageSource.cs
- EntityCommandCompilationException.cs
- ObjectFullSpanRewriter.cs
- VisualBasicValue.cs
- ApplicationServiceManager.cs
- DataServiceHostWrapper.cs
- ManagementObjectCollection.cs
- COM2IDispatchConverter.cs
- XslCompiledTransform.cs
- CryptoKeySecurity.cs
- Expander.cs
- FormViewDeleteEventArgs.cs
- StylusSystemGestureEventArgs.cs
- WebPartMovingEventArgs.cs
- ShutDownListener.cs
- RsaSecurityTokenAuthenticator.cs
- HttpPostServerProtocol.cs
- WebBrowserDocumentCompletedEventHandler.cs
- TextBox.cs
- ToolStripArrowRenderEventArgs.cs
- StrongNameMembershipCondition.cs
- SqlHelper.cs
- GridViewRow.cs
- XmlAttributeOverrides.cs
- SimpleMailWebEventProvider.cs