Code:
/ 4.0 / 4.0 / untmp / DEVDIV_TFS / Dev10 / Releases / RTMRel / ndp / fx / src / Configuration / System / Configuration / ConfigurationPropertyCollection.cs / 1305376 / ConfigurationPropertyCollection.cs
//------------------------------------------------------------------------------ //// Copyright (c) Microsoft Corporation. All rights reserved. // //----------------------------------------------------------------------------- using System; using System.Collections; namespace System.Configuration { public class ConfigurationPropertyCollection : ICollection { private ArrayList _items = new ArrayList(); public int Count { get { return _items.Count; } } public bool IsSynchronized { get { return false; } } public Object SyncRoot { get { return _items; } } internal ConfigurationProperty DefaultCollectionProperty { get { return this[ConfigurationProperty.DefaultCollectionPropertyName]; } } void ICollection.CopyTo(Array array, int index) { _items.CopyTo(array, index); } public void CopyTo(ConfigurationProperty[] array, int index) { ((ICollection)this).CopyTo(array, index); } public IEnumerator GetEnumerator() { return _items.GetEnumerator(); } public ConfigurationProperty this[String name] { get { for (int index = 0; index < _items.Count; index++) { ConfigurationProperty cp = (ConfigurationProperty)_items[index]; if (cp.Name == name) { return (ConfigurationProperty)_items[index]; } } return (ConfigurationProperty)null; } } public bool Contains(String name) { for (int index = 0; index < _items.Count; index++) { ConfigurationProperty cp = (ConfigurationProperty)_items[index]; if (cp.Name == name) { return true; } } return false; } public void Add(ConfigurationProperty property) { if (Contains(property.Name) != true) { _items.Add(property); } } public bool Remove(string name) { for (int index = 0; index < _items.Count; index++) { ConfigurationProperty cp = (ConfigurationProperty)_items[index]; if (cp.Name == name) { _items.RemoveAt(index); return true; } } return false; } public void Clear() { _items.Clear(); } } } // 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
- MenuStrip.cs
- ISAPIApplicationHost.cs
- WebPartEditVerb.cs
- ConnectionPointGlyph.cs
- MailDefinition.cs
- EncoderReplacementFallback.cs
- XmlProcessingInstruction.cs
- GuidelineCollection.cs
- DiscreteKeyFrames.cs
- MappingItemCollection.cs
- BaseTreeIterator.cs
- EnumerableRowCollection.cs
- LinqDataSourceEditData.cs
- ThaiBuddhistCalendar.cs
- CodeDomDesignerLoader.cs
- ToolStripScrollButton.cs
- ResourceContainer.cs
- ConfigurationManagerHelperFactory.cs
- TraceHandlerErrorFormatter.cs
- DocumentOrderQuery.cs
- DataObjectSettingDataEventArgs.cs
- Encoder.cs
- SystemDiagnosticsSection.cs
- NamespaceMapping.cs
- GenericUriParser.cs
- SpellerStatusTable.cs
- CommandDevice.cs
- AmbiguousMatchException.cs
- StringConverter.cs
- Utils.cs
- DataGridAutoFormat.cs
- AsyncOperation.cs
- TreeNodeCollection.cs
- DPAPIProtectedConfigurationProvider.cs
- Maps.cs
- CancelEventArgs.cs
- DayRenderEvent.cs
- FeatureManager.cs
- ObjectDataSourceChooseTypePanel.cs
- ContextStack.cs
- ProfessionalColors.cs
- ApplicationInfo.cs
- NullableIntMinMaxAggregationOperator.cs
- DataServiceRequestArgs.cs
- ADMembershipUser.cs
- HtmlToClrEventProxy.cs
- SetMemberBinder.cs
- StickyNote.cs
- SortExpressionBuilder.cs
- DispatchChannelSink.cs
- TextContainerChangedEventArgs.cs
- SmtpAuthenticationManager.cs
- WorkItem.cs
- Configuration.cs
- ProcessHostFactoryHelper.cs
- OutArgument.cs
- NavigationFailedEventArgs.cs
- BindingNavigator.cs
- XmlUrlResolver.cs
- SafeThreadHandle.cs
- StyleConverter.cs
- BamlReader.cs
- ExtendedProperty.cs
- ContentElement.cs
- util.cs
- Odbc32.cs
- DataGridViewRowPostPaintEventArgs.cs
- TransformerInfoCollection.cs
- AsyncWaitHandle.cs
- CloudCollection.cs
- CompilerLocalReference.cs
- DBAsyncResult.cs
- Verify.cs
- IOThreadTimer.cs
- HeaderedContentControl.cs
- TableRowCollection.cs
- StructureChangedEventArgs.cs
- GACMembershipCondition.cs
- StringResourceManager.cs
- AccessControlList.cs
- CustomAttributeFormatException.cs
- PointConverter.cs
- SystemIPGlobalStatistics.cs
- ResourceDescriptionAttribute.cs
- XmlElementElementCollection.cs
- HotSpotCollection.cs
- TextTabProperties.cs
- DbCommandDefinition.cs
- AstNode.cs
- HtmlForm.cs
- SystemIcons.cs
- StringExpressionSet.cs
- OdbcEnvironmentHandle.cs
- DynamicRendererThreadManager.cs
- TransformGroup.cs
- Nullable.cs
- DataGridViewComboBoxCell.cs
- SizeChangedInfo.cs
- DecryptRequest.cs
- RepeaterCommandEventArgs.cs