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
- UnsafeNativeMethods.cs
- SqlDataReader.cs
- WebPartDisplayModeEventArgs.cs
- X509Certificate.cs
- ReadOnlyCollection.cs
- AdRotator.cs
- TableCellCollection.cs
- FixedPageProcessor.cs
- ErrorsHelper.cs
- XmlSchemaSequence.cs
- TabControlCancelEvent.cs
- Operand.cs
- VisualTreeHelper.cs
- OdbcParameter.cs
- ProxyHwnd.cs
- ElementNotEnabledException.cs
- WebPartUserCapability.cs
- SocketStream.cs
- Identifier.cs
- CellRelation.cs
- VirtualPathUtility.cs
- RegisteredExpandoAttribute.cs
- XmlExpressionDumper.cs
- ComplexTypeEmitter.cs
- AdornerHitTestResult.cs
- DataBinding.cs
- LineGeometry.cs
- UserPreference.cs
- QuaternionRotation3D.cs
- TypedMessageConverter.cs
- InputEventArgs.cs
- RelationshipEndMember.cs
- DateTimeConstantAttribute.cs
- DateTimeStorage.cs
- BaseProcessor.cs
- EDesignUtil.cs
- DocumentOrderComparer.cs
- HtmlForm.cs
- ResXBuildProvider.cs
- SqlGenericUtil.cs
- StreamReader.cs
- InkCanvasFeedbackAdorner.cs
- RotateTransform.cs
- WebPartVerbsEventArgs.cs
- TranslateTransform3D.cs
- ObjectSpanRewriter.cs
- SecurityCriticalDataForSet.cs
- PerformanceCounterPermission.cs
- TraceXPathNavigator.cs
- SiteMapHierarchicalDataSourceView.cs
- RegisteredArrayDeclaration.cs
- ReflectionTypeLoadException.cs
- LateBoundBitmapDecoder.cs
- TypefaceMap.cs
- CodeCastExpression.cs
- GenericIdentity.cs
- EditorPart.cs
- SystemIcmpV4Statistics.cs
- ColorTranslator.cs
- DBCSCodePageEncoding.cs
- OleDbError.cs
- TextLineResult.cs
- IdentityHolder.cs
- Collection.cs
- ConfigXmlWhitespace.cs
- ParseChildrenAsPropertiesAttribute.cs
- MarginCollapsingState.cs
- BaseTreeIterator.cs
- WebBrowserPermission.cs
- SqlRowUpdatedEvent.cs
- ConfigurationSchemaErrors.cs
- DataGridViewCellStyleConverter.cs
- RuntimeConfigLKG.cs
- XMLSyntaxException.cs
- DataListItem.cs
- DbUpdateCommandTree.cs
- XPathNavigator.cs
- Cell.cs
- ResourceBinder.cs
- GlobalItem.cs
- StringSource.cs
- ToolboxComponentsCreatingEventArgs.cs
- ControlDesigner.cs
- UpdatePanel.cs
- MemberCollection.cs
- _TimerThread.cs
- ProgressBarAutomationPeer.cs
- TypeConverterHelper.cs
- SendAgentStatusRequest.cs
- LocatorPartList.cs
- ScriptModule.cs
- TriggerAction.cs
- SerializationInfoEnumerator.cs
- LogWriteRestartAreaState.cs
- DataList.cs
- Pointer.cs
- WeakHashtable.cs
- XdrBuilder.cs
- ColumnResizeAdorner.cs
- XmlDataDocument.cs