Code:
/ FXUpdate3074 / FXUpdate3074 / 1.1 / untmp / whidbey / QFE / ndp / fx / src / xsp / System / Web / Util / EmptyCollection.cs / 1 / EmptyCollection.cs
//------------------------------------------------------------------------------ //// Copyright (c) Microsoft Corporation. All rights reserved. // //----------------------------------------------------------------------------- /* * EmptyCollection class * * Copyright (c) 1999 Microsoft Corporation */ namespace System.Web.Util { using System.Collections; /* * Fast implementation of an empty collection */ internal class EmptyCollection: ICollection, IEnumerator { private static EmptyCollection s_theEmptyCollection = new EmptyCollection(); private EmptyCollection() { } // Return the same instance all the time, since it's immutable internal static EmptyCollection Instance { get { return s_theEmptyCollection; } } // ICollection implementation IEnumerator IEnumerable.GetEnumerator() { return this; } public int Count { get { return 0; } } bool ICollection.IsSynchronized { get { return true; } } object ICollection.SyncRoot { get { return this; } } public void CopyTo(Array array, int index) { } // IEnumerator implementation object IEnumerator.Current { get { return null; } } bool IEnumerator.MoveNext() { return false; } void IEnumerator.Reset() { } } } // File provided for Reference Use Only by Microsoft Corporation (c) 2007. // Copyright (c) Microsoft Corporation. All rights reserved.
Link Menu
This book is available now!
Buy at Amazon US or
Buy at Amazon UK
- ConfigurationStrings.cs
- CqlParser.cs
- MethodToken.cs
- XpsFixedDocumentSequenceReaderWriter.cs
- BaseTemplateCodeDomTreeGenerator.cs
- MailWebEventProvider.cs
- ReferenceService.cs
- PreloadedPackages.cs
- MenuScrollingVisibilityConverter.cs
- SamlAuthenticationClaimResource.cs
- ConfigXmlElement.cs
- KeySplineConverter.cs
- AppendHelper.cs
- StandardCommands.cs
- Compilation.cs
- VersionedStream.cs
- WebPartHeaderCloseVerb.cs
- ColumnHeader.cs
- HostedHttpTransportManager.cs
- Int64.cs
- CommandManager.cs
- CancellationHandler.cs
- RemotingException.cs
- SubstitutionList.cs
- CharacterShapingProperties.cs
- Line.cs
- CustomLineCap.cs
- NavigationPropertyEmitter.cs
- mediaeventargs.cs
- SmiMetaData.cs
- PeerName.cs
- StringAnimationUsingKeyFrames.cs
- ButtonAutomationPeer.cs
- PermissionListSet.cs
- SchemaCollectionPreprocessor.cs
- SourceElementsCollection.cs
- PeerValidationBehavior.cs
- Statements.cs
- oledbconnectionstring.cs
- DesignConnectionCollection.cs
- IntAverageAggregationOperator.cs
- XmlSchemaException.cs
- ValueSerializerAttribute.cs
- GlyphCache.cs
- NetDispatcherFaultException.cs
- URLEditor.cs
- LayoutTableCell.cs
- LinkClickEvent.cs
- DataTableCollection.cs
- GetWinFXPath.cs
- CompositeActivityCodeGenerator.cs
- SiteMapNode.cs
- StylusPlugin.cs
- NotifyParentPropertyAttribute.cs
- OracleParameterBinding.cs
- SoapElementAttribute.cs
- MessagePartSpecification.cs
- SafeHandles.cs
- IsolatedStorageFileStream.cs
- TrimSurroundingWhitespaceAttribute.cs
- AlphaSortedEnumConverter.cs
- TimeSpanStorage.cs
- MailAddressParser.cs
- BrowserInteropHelper.cs
- CheckBox.cs
- SafeLocalMemHandle.cs
- ProtocolsConfigurationEntry.cs
- AssemblyHelper.cs
- ThreadInterruptedException.cs
- CursorEditor.cs
- XsltQilFactory.cs
- WebPartZone.cs
- RangeValueProviderWrapper.cs
- GeneratedView.cs
- TrackBarRenderer.cs
- RichTextBox.cs
- TypeInitializationException.cs
- ConstraintStruct.cs
- sqlmetadatafactory.cs
- EncodingTable.cs
- TitleStyle.cs
- StructuredTypeEmitter.cs
- DelegateSerializationHolder.cs
- IPeerNeighbor.cs
- PropertyNames.cs
- WindowsFormsHelpers.cs
- MetadataItemEmitter.cs
- UnitControl.cs
- UIElement.cs
- CodeMethodReturnStatement.cs
- TextTreeText.cs
- IdleTimeoutMonitor.cs
- WebHttpDispatchOperationSelectorData.cs
- PrintPreviewDialog.cs
- Roles.cs
- ErrorProvider.cs
- ActivationArguments.cs
- Matrix3DStack.cs
- Tracer.cs
- ProviderSettings.cs