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
- StylusCaptureWithinProperty.cs
- DataReaderContainer.cs
- BinaryUtilClasses.cs
- GlyphRunDrawing.cs
- PresentationSource.cs
- EntityException.cs
- SystemIcmpV4Statistics.cs
- DeploymentExceptionMapper.cs
- ErrorStyle.cs
- KeyboardDevice.cs
- OletxResourceManager.cs
- XsltContext.cs
- ColumnPropertiesGroup.cs
- COM2ExtendedBrowsingHandler.cs
- BinaryObjectInfo.cs
- CharEnumerator.cs
- TypeForwardedToAttribute.cs
- CodeStatement.cs
- TypePresenter.xaml.cs
- XsltConvert.cs
- BuildProviderUtils.cs
- IntPtr.cs
- TimeSpanConverter.cs
- CacheDependency.cs
- ReaderOutput.cs
- StylusPointPropertyId.cs
- DataBoundLiteralControl.cs
- GC.cs
- PostBackOptions.cs
- TextRangeEdit.cs
- DebugTraceHelper.cs
- XmlSerializerNamespaces.cs
- NameSpaceEvent.cs
- SuppressMessageAttribute.cs
- OracleConnectionFactory.cs
- Propagator.cs
- InternalSafeNativeMethods.cs
- WebPartsPersonalizationAuthorization.cs
- EDesignUtil.cs
- BamlLocalizableResource.cs
- UdpSocket.cs
- CatalogPartChrome.cs
- LongValidatorAttribute.cs
- PasswordBoxAutomationPeer.cs
- ImageInfo.cs
- FtpRequestCacheValidator.cs
- WorkflowTransactionService.cs
- DataGridViewCellStyle.cs
- FormsAuthenticationEventArgs.cs
- WebBaseEventKeyComparer.cs
- ALinqExpressionVisitor.cs
- _OSSOCK.cs
- ObjectStateManagerMetadata.cs
- RemoteWebConfigurationHost.cs
- TextFormatterHost.cs
- RIPEMD160Managed.cs
- RelOps.cs
- ContainerAction.cs
- WpfPayload.cs
- SecurityIdentifierElementCollection.cs
- SoapFault.cs
- SecurityTokenInclusionMode.cs
- _NestedMultipleAsyncResult.cs
- InvariantComparer.cs
- TemplatePartAttribute.cs
- ProfileGroupSettingsCollection.cs
- ValueUtilsSmi.cs
- GridViewUpdateEventArgs.cs
- BitmapFrame.cs
- FlowLayoutPanel.cs
- OptimizedTemplateContentHelper.cs
- VisualTreeUtils.cs
- DocumentViewerBaseAutomationPeer.cs
- TiffBitmapEncoder.cs
- FrameworkContextData.cs
- BaseCAMarshaler.cs
- StringAnimationBase.cs
- BypassElement.cs
- documentsequencetextcontainer.cs
- AndMessageFilter.cs
- EncryptedPackageFilter.cs
- SchemaSetCompiler.cs
- AccessDataSourceView.cs
- MonthCalendarDesigner.cs
- DefaultAssemblyResolver.cs
- ObfuscateAssemblyAttribute.cs
- TreeNodeMouseHoverEvent.cs
- BaseWebProxyFinder.cs
- DoubleAnimationBase.cs
- Verify.cs
- RemotingAttributes.cs
- CodeMethodInvokeExpression.cs
- AnonymousIdentificationModule.cs
- BasicExpressionVisitor.cs
- LineMetrics.cs
- LassoSelectionBehavior.cs
- ApplicationInfo.cs
- StateManagedCollection.cs
- BindableTemplateBuilder.cs
- WebPartConnectionCollection.cs