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
![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
- DataServiceEntityAttribute.cs
- MetadataWorkspace.cs
- WinEventHandler.cs
- ExcludeFromCodeCoverageAttribute.cs
- GridViewSelectEventArgs.cs
- SafeLibraryHandle.cs
- BasicHttpMessageCredentialType.cs
- DataGridViewCellValueEventArgs.cs
- Logging.cs
- ExecutionEngineException.cs
- ProfileGroupSettings.cs
- IfJoinedCondition.cs
- TimelineGroup.cs
- HtmlImage.cs
- TryExpression.cs
- Hyperlink.cs
- XmlDocumentSurrogate.cs
- PermissionToken.cs
- Util.cs
- BaseDataList.cs
- ChangePassword.cs
- SessionSwitchEventArgs.cs
- DispatcherObject.cs
- ProgressiveCrcCalculatingStream.cs
- InternalRelationshipCollection.cs
- ServiceDescriptionData.cs
- TransformPatternIdentifiers.cs
- SiteOfOriginContainer.cs
- RemoveStoryboard.cs
- _ScatterGatherBuffers.cs
- _ConnectionGroup.cs
- ByteStack.cs
- TdsRecordBufferSetter.cs
- WindowsListViewSubItem.cs
- WorkerRequest.cs
- SingleTagSectionHandler.cs
- FilePrompt.cs
- NullableBoolConverter.cs
- TraceData.cs
- TextEndOfLine.cs
- BuildResult.cs
- DeobfuscatingStream.cs
- Lasso.cs
- ThreadExceptionDialog.cs
- ExtentKey.cs
- EventBuilder.cs
- TextTreeTextNode.cs
- linebase.cs
- XhtmlConformanceSection.cs
- ReflectEventDescriptor.cs
- EasingFunctionBase.cs
- RelationshipDetailsRow.cs
- FormView.cs
- X509Utils.cs
- XmlIncludeAttribute.cs
- UshortList2.cs
- TraceProvider.cs
- SymbolMethod.cs
- RepeaterDataBoundAdapter.cs
- DashStyles.cs
- Speller.cs
- MissingSatelliteAssemblyException.cs
- KeyGestureValueSerializer.cs
- OleDbEnumerator.cs
- NumericUpDownAccelerationCollection.cs
- XmlSchemaValidationException.cs
- InvokeWebServiceDesigner.cs
- PersonalizationEntry.cs
- HtmlInputImage.cs
- ClientSettingsProvider.cs
- ReaderOutput.cs
- DrawingContextFlattener.cs
- Transform.cs
- DiscreteKeyFrames.cs
- SafeArchiveContext.cs
- ImageCodecInfo.cs
- InlineUIContainer.cs
- _UriSyntax.cs
- RoutedEventValueSerializer.cs
- SpecialTypeDataContract.cs
- WindowsGraphics.cs
- LicenseContext.cs
- SecurityCookieModeValidator.cs
- Size3DConverter.cs
- ExceptionValidationRule.cs
- MemoryMappedViewAccessor.cs
- AuthenticationService.cs
- RequestContextBase.cs
- PreProcessInputEventArgs.cs
- PlainXmlWriter.cs
- ScrollContentPresenter.cs
- FormatConvertedBitmap.cs
- ResourceExpressionEditorSheet.cs
- IImplicitResourceProvider.cs
- NativeDirectoryServicesQueryAPIs.cs
- FaultConverter.cs
- Matrix3DValueSerializer.cs
- XmlSchemaComplexContentRestriction.cs
- BitmapEffect.cs
- ComponentDesigner.cs