Code:
/ FX-1434 / FX-1434 / 1.0 / untmp / whidbey / REDBITS / ndp / fx / src / Xml / System / Xml / Dom / XmlChildNodes.cs / 1 / XmlChildNodes.cs
//------------------------------------------------------------------------------ //// Copyright (c) Microsoft Corporation. All rights reserved. // //[....] //----------------------------------------------------------------------------- namespace System.Xml { using System.Collections; internal class XmlChildNodes: XmlNodeList { private XmlNode container; public XmlChildNodes( XmlNode container ) { this.container = container; } public override XmlNode Item( int i ) { // Out of range indexes return a null XmlNode if (i < 0) return null; for (XmlNode n = container.FirstChild; n != null; n = n.NextSibling, i--) { if (i == 0) return n; } return null; } public override int Count { get { int c = 0; for (XmlNode n = container.FirstChild; n != null; n = n.NextSibling) { c++; } return c; } } public override IEnumerator GetEnumerator() { if ( container.FirstChild == null ) { return XmlDocument.EmptyEnumerator; } else { return new XmlChildEnumerator( container ); } } } } // 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
- ReaderWriterLock.cs
- ReverseInheritProperty.cs
- ObjectToIdCache.cs
- FixedSOMPage.cs
- SplitterEvent.cs
- FileReservationCollection.cs
- ThreadStartException.cs
- PingOptions.cs
- DataControlFieldHeaderCell.cs
- WebPartDescriptionCollection.cs
- XmlDocumentSerializer.cs
- OverflowException.cs
- Freezable.cs
- LambdaCompiler.Lambda.cs
- Condition.cs
- XsltArgumentList.cs
- FlowDocumentReaderAutomationPeer.cs
- ErrorStyle.cs
- ContentElement.cs
- DBConcurrencyException.cs
- MarshalByValueComponent.cs
- TempEnvironment.cs
- LookupTables.cs
- DataGridViewUtilities.cs
- Rotation3DKeyFrameCollection.cs
- ReadOnlyCollection.cs
- StateChangeEvent.cs
- GroupDescription.cs
- HTMLTagNameToTypeMapper.cs
- FontStretch.cs
- XmlConvert.cs
- TextContainerChangedEventArgs.cs
- UndoManager.cs
- Misc.cs
- ShellProvider.cs
- RenamedEventArgs.cs
- Freezable.cs
- RNGCryptoServiceProvider.cs
- LocatorPartList.cs
- WebBaseEventKeyComparer.cs
- EndpointDiscoveryBehavior.cs
- IdnElement.cs
- TrimSurroundingWhitespaceAttribute.cs
- CodeGenerator.cs
- StateDesigner.LayoutSelectionGlyph.cs
- FormViewPagerRow.cs
- HuffModule.cs
- ImageButton.cs
- ElementsClipboardData.cs
- BuiltInPermissionSets.cs
- SecurityKeyIdentifier.cs
- HealthMonitoringSectionHelper.cs
- DeviceSpecificChoiceCollection.cs
- CodeTypeReference.cs
- ButtonColumn.cs
- MultipartIdentifier.cs
- RuleInfoComparer.cs
- HttpInputStream.cs
- SocketException.cs
- RepeaterItem.cs
- ISAPIRuntime.cs
- StoreItemCollection.cs
- IdentifierService.cs
- CommonDialog.cs
- MenuTracker.cs
- httpapplicationstate.cs
- ContextDataSourceContextData.cs
- RSAProtectedConfigurationProvider.cs
- SevenBitStream.cs
- _SslSessionsCache.cs
- HtmlInputPassword.cs
- ObjectSecurity.cs
- EdmScalarPropertyAttribute.cs
- Propagator.Evaluator.cs
- TextPointer.cs
- ContextMenuAutomationPeer.cs
- DataGridViewCellPaintingEventArgs.cs
- BufferBuilder.cs
- nulltextcontainer.cs
- TextModifier.cs
- ComplexType.cs
- _SecureChannel.cs
- FixedSOMSemanticBox.cs
- InternalBase.cs
- IResourceProvider.cs
- VerticalAlignConverter.cs
- MatrixIndependentAnimationStorage.cs
- DeflateStream.cs
- InfoCardPolicy.cs
- PropertyPushdownHelper.cs
- SiteMapSection.cs
- WindowsGrip.cs
- ThousandthOfEmRealDoubles.cs
- XmlTextReaderImpl.cs
- ObjectConverter.cs
- TraceUtils.cs
- SqlConnectionPoolProviderInfo.cs
- TemplateBindingExtensionConverter.cs
- HebrewCalendar.cs
- StringSource.cs