Code:
/ 4.0 / 4.0 / DEVDIV_TFS / Dev10 / Releases / RTMRel / ndp / clr / src / BCL / System / Collections / ReadOnlyCollectionBase.cs / 1305376 / ReadOnlyCollectionBase.cs
// ==++== // // Copyright (c) Microsoft Corporation. All rights reserved. // // ==--== //------------------------------------------------------------------------------ //----------------------------------------------------------------------------- //[....] // namespace System.Collections { using System; // Useful base class for typed readonly collections where items derive from object [Serializable] [System.Runtime.InteropServices.ComVisible(true)] public abstract class ReadOnlyCollectionBase : ICollection { ArrayList list; protected ArrayList InnerList { get { if (list == null) list = new ArrayList(); return list; } } public virtual int Count { get { return InnerList.Count; } } bool ICollection.IsSynchronized { get { return InnerList.IsSynchronized; } } object ICollection.SyncRoot { get { return InnerList.SyncRoot; } } void ICollection.CopyTo(Array array, int index) { InnerList.CopyTo(array, index); } public virtual IEnumerator GetEnumerator() { return InnerList.GetEnumerator(); } } } // File provided for Reference Use Only by Microsoft Corporation (c) 2007. // ==++== // // Copyright (c) Microsoft Corporation. All rights reserved. // // ==--== //------------------------------------------------------------------------------ //----------------------------------------------------------------------------- //[....] // namespace System.Collections { using System; // Useful base class for typed readonly collections where items derive from object [Serializable] [System.Runtime.InteropServices.ComVisible(true)] public abstract class ReadOnlyCollectionBase : ICollection { ArrayList list; protected ArrayList InnerList { get { if (list == null) list = new ArrayList(); return list; } } public virtual int Count { get { return InnerList.Count; } } bool ICollection.IsSynchronized { get { return InnerList.IsSynchronized; } } object ICollection.SyncRoot { get { return InnerList.SyncRoot; } } void ICollection.CopyTo(Array array, int index) { InnerList.CopyTo(array, index); } public virtual IEnumerator GetEnumerator() { return InnerList.GetEnumerator(); } } } // 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
- SqlDataSourceView.cs
- InstanceDescriptor.cs
- NavigationProperty.cs
- ClientBuildManager.cs
- MessageSecurityTokenVersion.cs
- PKCS1MaskGenerationMethod.cs
- ImageClickEventArgs.cs
- CodeAccessPermission.cs
- Soap12ProtocolReflector.cs
- RegexInterpreter.cs
- GridViewColumnHeader.cs
- SqlNode.cs
- RuleConditionDialog.Designer.cs
- TypeDescriptionProviderAttribute.cs
- DataTableReaderListener.cs
- TrackPointCollection.cs
- StatusBarDrawItemEvent.cs
- TraceHandlerErrorFormatter.cs
- FormViewDeleteEventArgs.cs
- dbdatarecord.cs
- XhtmlBasicLiteralTextAdapter.cs
- XmlWriter.cs
- DocumentSequenceHighlightLayer.cs
- Helpers.cs
- UiaCoreApi.cs
- DbConnectionPoolIdentity.cs
- DateTimeConverter2.cs
- CollectionContainer.cs
- CoTaskMemUnicodeSafeHandle.cs
- RectAnimationUsingKeyFrames.cs
- WebPartEditorApplyVerb.cs
- DetailsViewUpdatedEventArgs.cs
- EventSinkHelperWriter.cs
- UnaryNode.cs
- DateTimeUtil.cs
- Effect.cs
- MessageQueueCriteria.cs
- Keywords.cs
- Encoding.cs
- SignatureDescription.cs
- DispatcherTimer.cs
- XmlName.cs
- JournalEntryListConverter.cs
- ColorBlend.cs
- ImageListStreamer.cs
- XmlChildNodes.cs
- selecteditemcollection.cs
- SerTrace.cs
- ButtonFlatAdapter.cs
- IndexingContentUnit.cs
- ColumnMap.cs
- XmlSchemaImport.cs
- FloaterBaseParagraph.cs
- TypeUsageBuilder.cs
- FunctionDescription.cs
- ModuleBuilderData.cs
- SecuritySessionClientSettings.cs
- ZipIOBlockManager.cs
- MimeTypeAttribute.cs
- BuildManager.cs
- EntityDataSourceStatementEditorForm.cs
- ASCIIEncoding.cs
- HtmlShim.cs
- InstalledFontCollection.cs
- FlowDocumentReaderAutomationPeer.cs
- HiddenFieldPageStatePersister.cs
- CustomErrorCollection.cs
- AttachmentCollection.cs
- EventsTab.cs
- SrgsOneOf.cs
- SortedList.cs
- StorageInfo.cs
- DataSourceControl.cs
- Axis.cs
- WinInetCache.cs
- WinCategoryAttribute.cs
- ShadowGlyph.cs
- XmlTextReaderImplHelpers.cs
- MultiBinding.cs
- ClientTargetSection.cs
- Matrix3D.cs
- CodeConditionStatement.cs
- TimeoutException.cs
- RegexReplacement.cs
- TraceInternal.cs
- CorrelationManager.cs
- PlatformNotSupportedException.cs
- ApplicationContext.cs
- WaveHeader.cs
- NavigationService.cs
- RewritingPass.cs
- ChildTable.cs
- CodeDirectionExpression.cs
- TabControlCancelEvent.cs
- FormattedText.cs
- ContentControl.cs
- BitmapFrame.cs
- QilIterator.cs
- RootNamespaceAttribute.cs
- NegotiateStream.cs