Code:
/ Dotnetfx_Win7_3.5.1 / Dotnetfx_Win7_3.5.1 / 3.5.1 / DEVDIV / depot / DevDiv / releases / whidbey / NetFXspW7 / 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
![Network programming in C#, Network Programming in VB.NET, Network Programming in .NET](/images/book.jpg)
This book is available now!
Buy at Amazon US or
Buy at Amazon UK
- SetUserPreferenceRequest.cs
- GrammarBuilderDictation.cs
- ContextMarshalException.cs
- ServiceOperationUIEditor.cs
- OperationParameterInfoCollection.cs
- ImageDrawing.cs
- GeneralTransform.cs
- GridViewRowPresenter.cs
- StateChangeEvent.cs
- RectKeyFrameCollection.cs
- BooleanStorage.cs
- PrintDocument.cs
- WebControlToolBoxItem.cs
- TiffBitmapDecoder.cs
- EventPrivateKey.cs
- AffineTransform3D.cs
- Clock.cs
- GridLength.cs
- OdbcEnvironment.cs
- TdsRecordBufferSetter.cs
- EndpointAddressMessageFilter.cs
- Parser.cs
- ModelEditingScope.cs
- RSAProtectedConfigurationProvider.cs
- TimeSpanSecondsOrInfiniteConverter.cs
- DataGrid.cs
- Scheduler.cs
- NumericUpDown.cs
- CircleHotSpot.cs
- ControlDesignerState.cs
- Dictionary.cs
- CodeAttributeArgument.cs
- ExeConfigurationFileMap.cs
- WsiProfilesElement.cs
- ExpressionBuilderCollection.cs
- ToolStripItemBehavior.cs
- unsafenativemethodstextservices.cs
- TextAction.cs
- NavigationHelper.cs
- ReadOnlyPropertyMetadata.cs
- PublisherMembershipCondition.cs
- ListViewCancelEventArgs.cs
- SyntaxCheck.cs
- SerializerDescriptor.cs
- SplitterEvent.cs
- ResourceProperty.cs
- ConfigurationManagerInternal.cs
- OperatingSystem.cs
- UnionQueryOperator.cs
- MimeTypeMapper.cs
- Formatter.cs
- WeakReferenceEnumerator.cs
- _UriTypeConverter.cs
- SortedList.cs
- HtmlControl.cs
- NTAccount.cs
- _StreamFramer.cs
- VScrollProperties.cs
- RichTextBoxConstants.cs
- ComboBoxItem.cs
- SettingsAttributeDictionary.cs
- GenericTextProperties.cs
- Utility.cs
- mediaeventshelper.cs
- AppDomainFactory.cs
- InternalConfigEventArgs.cs
- RoleServiceManager.cs
- SettingsBase.cs
- FixedTextBuilder.cs
- CapabilitiesSection.cs
- LazyTextWriterCreator.cs
- SuppressIldasmAttribute.cs
- ConfigXmlReader.cs
- ControlDesigner.cs
- ValidationError.cs
- Pen.cs
- HighlightComponent.cs
- VirtualPathUtility.cs
- SystemFonts.cs
- CustomAttributeBuilder.cs
- SwitchElementsCollection.cs
- PerformanceCounter.cs
- Code.cs
- ItemsPresenter.cs
- coordinatorfactory.cs
- ClientProxyGenerator.cs
- QilName.cs
- LoginView.cs
- SerializationInfoEnumerator.cs
- TreeNodeCollectionEditorDialog.cs
- ObservableCollection.cs
- UnsafeNativeMethods.cs
- ServiceAppDomainAssociationProvider.cs
- DoubleAnimationClockResource.cs
- CryptoStream.cs
- AsyncCompletedEventArgs.cs
- FacetEnabledSchemaElement.cs
- ColumnWidthChangedEvent.cs
- JumpList.cs
- BaseProcessor.cs