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
- Renderer.cs
- XmlSchemaSimpleTypeRestriction.cs
- DeflateEmulationStream.cs
- DES.cs
- SystemWebSectionGroup.cs
- AdapterDictionary.cs
- X509SecurityTokenAuthenticator.cs
- SqlNodeAnnotations.cs
- SystemIPInterfaceProperties.cs
- HyperLinkField.cs
- EntityDataSourceWrapperCollection.cs
- XComponentModel.cs
- JsonReaderWriterFactory.cs
- TextViewBase.cs
- TextureBrush.cs
- HttpException.cs
- HtmlTableRow.cs
- ObjectConverter.cs
- AddInAttribute.cs
- SqlMetaData.cs
- RawTextInputReport.cs
- FolderNameEditor.cs
- NativeWindow.cs
- PropertyGridEditorPart.cs
- ErrorRuntimeConfig.cs
- LoginCancelEventArgs.cs
- XamlTypeMapper.cs
- XmlBinaryWriterSession.cs
- RootCodeDomSerializer.cs
- LoginNameDesigner.cs
- DescendentsWalkerBase.cs
- Cursor.cs
- DataAccessor.cs
- ClrProviderManifest.cs
- RuntimeHandles.cs
- NameTable.cs
- NativeMethods.cs
- RadioButtonStandardAdapter.cs
- LinkDesigner.cs
- CodeCompiler.cs
- AuthenticationConfig.cs
- TimerElapsedEvenArgs.cs
- PerfCounters.cs
- BindingExpression.cs
- RootBuilder.cs
- PopOutPanel.cs
- CommonProperties.cs
- Operators.cs
- XsltLibrary.cs
- TypedTableHandler.cs
- ExpressionLink.cs
- AutomationPatternInfo.cs
- BatchStream.cs
- TypedDataSourceCodeGenerator.cs
- MarginCollapsingState.cs
- MimeParameters.cs
- XmlNode.cs
- IntranetCredentialPolicy.cs
- HtmlInputSubmit.cs
- RoleManagerModule.cs
- TextWriterTraceListener.cs
- WorkflowServiceInstance.cs
- ParseHttpDate.cs
- ExtractedStateEntry.cs
- RuntimeHelpers.cs
- ReceiveCompletedEventArgs.cs
- ProtocolsConfiguration.cs
- Queue.cs
- CellTreeNodeVisitors.cs
- OdbcConnectionOpen.cs
- CodeCatchClauseCollection.cs
- DataGridViewTextBoxColumn.cs
- SynchronousSendBindingElement.cs
- SubpageParagraph.cs
- Int32Storage.cs
- HttpProfileBase.cs
- XmlSchemaComplexContent.cs
- EmptyStringExpandableObjectConverter.cs
- SaveFileDialog.cs
- WindowsFont.cs
- TCPListener.cs
- SqlDependencyListener.cs
- CompilerInfo.cs
- WebBrowsableAttribute.cs
- ViewManager.cs
- StyleSheetComponentEditor.cs
- DoubleAnimation.cs
- CheckBoxAutomationPeer.cs
- TextTreeInsertElementUndoUnit.cs
- StructuralType.cs
- JsonGlobals.cs
- ClientData.cs
- XmlMapping.cs
- DbConnectionPool.cs
- CopyOnWriteList.cs
- SQLRoleProvider.cs
- XamlPathDataSerializer.cs
- NameSpaceExtractor.cs
- SourceFileBuildProvider.cs
- CqlLexer.cs