Code:
/ 4.0 / 4.0 / DEVDIV_TFS / Dev10 / Releases / RTMRel / ndp / fx / src / xsp / System / Web / UI / WebControls / DataListItemCollection.cs / 1305376 / DataListItemCollection.cs
//------------------------------------------------------------------------------ //// Copyright (c) Microsoft Corporation. All rights reserved. // //----------------------------------------------------------------------------- /* */ namespace System.Web.UI.WebControls { using System; using System.Collections; ////// public sealed class DataListItemCollection : ICollection { private ArrayList items; ///Represents the collection of ///objects /// public DataListItemCollection(ArrayList items) { this.items = items; } ///Initializes a new instance of the ///class. /// public int Count { get { return items.Count; } } ///Gets the number of items in the collection. ////// public bool IsReadOnly { get { return false; } } ///Gets a value that specifies whether items in the ///can be modified. /// public bool IsSynchronized { get { return false; } } ///Gets a value that indicates whether the ///is thread-safe. /// public object SyncRoot { get { return this; } } ///Gets the object used to synchronize access to the collection. ////// public DataListItem this[int index] { get { return(DataListItem)items[index]; } } ///Gets a ///at the specified index in the /// collection. /// public void CopyTo(Array array, int index) { for (IEnumerator e = this.GetEnumerator(); e.MoveNext();) array.SetValue(e.Current, index++); } ///Copies the contents of the entire collection into an ///appending at /// the specified index of the . /// public IEnumerator GetEnumerator() { return items.GetEnumerator(); } } } // File provided for Reference Use Only by Microsoft Corporation (c) 2007. //------------------------------------------------------------------------------ //Creates an enumerator for the ///used to iterate /// through the collection. // Copyright (c) Microsoft Corporation. All rights reserved. // //----------------------------------------------------------------------------- /* */ namespace System.Web.UI.WebControls { using System; using System.Collections; ////// public sealed class DataListItemCollection : ICollection { private ArrayList items; ///Represents the collection of ///objects /// public DataListItemCollection(ArrayList items) { this.items = items; } ///Initializes a new instance of the ///class. /// public int Count { get { return items.Count; } } ///Gets the number of items in the collection. ////// public bool IsReadOnly { get { return false; } } ///Gets a value that specifies whether items in the ///can be modified. /// public bool IsSynchronized { get { return false; } } ///Gets a value that indicates whether the ///is thread-safe. /// public object SyncRoot { get { return this; } } ///Gets the object used to synchronize access to the collection. ////// public DataListItem this[int index] { get { return(DataListItem)items[index]; } } ///Gets a ///at the specified index in the /// collection. /// public void CopyTo(Array array, int index) { for (IEnumerator e = this.GetEnumerator(); e.MoveNext();) array.SetValue(e.Current, index++); } ///Copies the contents of the entire collection into an ///appending at /// the specified index of the . /// public IEnumerator GetEnumerator() { return items.GetEnumerator(); } } } // File provided for Reference Use Only by Microsoft Corporation (c) 2007.Creates an enumerator for the ///used to iterate /// through the collection.
Link Menu
This book is available now!
Buy at Amazon US or
Buy at Amazon UK
- SafeFileMappingHandle.cs
- FieldAccessException.cs
- ClientBuildManagerCallback.cs
- FocusWithinProperty.cs
- PointConverter.cs
- ControlPaint.cs
- DataGridViewCheckBoxColumn.cs
- HttpRuntimeSection.cs
- HttpRequestCacheValidator.cs
- BatchParser.cs
- ActiveXSite.cs
- LicenseProviderAttribute.cs
- ExceptionUtil.cs
- RoleManagerModule.cs
- ContainerParagraph.cs
- TextCharacters.cs
- StreamWithDictionary.cs
- ViewStateException.cs
- TrackingStringDictionary.cs
- DESCryptoServiceProvider.cs
- FileSystemInfo.cs
- CharacterBufferReference.cs
- ParallelRangeManager.cs
- SqlEnums.cs
- SamlAttribute.cs
- ClockController.cs
- Trace.cs
- HtmlWindowCollection.cs
- IndentedTextWriter.cs
- sqlinternaltransaction.cs
- RecordsAffectedEventArgs.cs
- ServiceBusyException.cs
- RoutedEventHandlerInfo.cs
- HTTPRemotingHandler.cs
- SpellCheck.cs
- SByte.cs
- ScaleTransform.cs
- RequestCacheEntry.cs
- TreeView.cs
- SHA1Managed.cs
- ToolStripRenderer.cs
- DataGridViewMethods.cs
- AttributeQuery.cs
- TextChange.cs
- XmlElementAttribute.cs
- BindingExpressionBase.cs
- XmlAnyElementAttribute.cs
- ChangeNode.cs
- SecurityTokenAttachmentMode.cs
- PersonalizationProviderCollection.cs
- XmlSignatureProperties.cs
- OdbcDataAdapter.cs
- DataViewManagerListItemTypeDescriptor.cs
- GraphicsPath.cs
- WpfMemberInvoker.cs
- BoundingRectTracker.cs
- SQLDecimal.cs
- XmlSerializerNamespaces.cs
- SiteOfOriginContainer.cs
- ApplicationHost.cs
- TextEditorTyping.cs
- ImportCatalogPart.cs
- PropertyGeneratedEventArgs.cs
- DependencyPropertyChangedEventArgs.cs
- basevalidator.cs
- GrammarBuilderDictation.cs
- AssemblyUtil.cs
- ViewCellRelation.cs
- PkcsMisc.cs
- DataGridLinkButton.cs
- ImmutableObjectAttribute.cs
- Parser.cs
- ModulesEntry.cs
- MessageLogger.cs
- SHA1Managed.cs
- ConnectionStringSettings.cs
- Matrix.cs
- AssemblySettingAttributes.cs
- XmlCharType.cs
- CapiSymmetricAlgorithm.cs
- CompiledQueryCacheEntry.cs
- HierarchicalDataBoundControl.cs
- ThreadInterruptedException.cs
- FileDialog.cs
- RadioButtonBaseAdapter.cs
- XamlTreeBuilderBamlRecordWriter.cs
- DataRowChangeEvent.cs
- TypeDescriptorContext.cs
- MethodRental.cs
- ModelVisual3D.cs
- CodeChecksumPragma.cs
- PersistenceTypeAttribute.cs
- SplashScreenNativeMethods.cs
- TableItemPattern.cs
- XslException.cs
- WinEventTracker.cs
- CodeConditionStatement.cs
- ListViewEditEventArgs.cs
- DataProtection.cs
- PerspectiveCamera.cs