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
- HeaderElement.cs
- PersonalizationAdministration.cs
- GroupStyle.cs
- LazyTextWriterCreator.cs
- SmiGettersStream.cs
- DataListItemEventArgs.cs
- TextEffect.cs
- SqlDataAdapter.cs
- SwitchAttribute.cs
- ObjectFactoryCodeDomTreeGenerator.cs
- XsltSettings.cs
- FormViewInsertedEventArgs.cs
- TypeSystem.cs
- Codec.cs
- TypeName.cs
- ExpressionBindings.cs
- ColorKeyFrameCollection.cs
- versioninfo.cs
- PersistChildrenAttribute.cs
- NoResizeSelectionBorderGlyph.cs
- TreeViewItem.cs
- EditorPartChrome.cs
- SynthesizerStateChangedEventArgs.cs
- safemediahandle.cs
- SecurityKeyType.cs
- BaseCodePageEncoding.cs
- SecurityException.cs
- DbXmlEnabledProviderManifest.cs
- CacheDict.cs
- TrackingMemoryStreamFactory.cs
- KeyTimeConverter.cs
- Misc.cs
- IndexedGlyphRun.cs
- CodeBlockBuilder.cs
- SplitterCancelEvent.cs
- QualificationDataItem.cs
- BinaryMethodMessage.cs
- BooleanSwitch.cs
- InheritanceContextChangedEventManager.cs
- NegotiateStream.cs
- Path.cs
- ItemsControlAutomationPeer.cs
- AtlasWeb.Designer.cs
- TextDecorationUnitValidation.cs
- CodeParameterDeclarationExpression.cs
- UserControlAutomationPeer.cs
- TTSVoice.cs
- RouteUrlExpressionBuilder.cs
- ProfileService.cs
- OperationValidationEventArgs.cs
- EntityDataSourceDesignerHelper.cs
- MultiplexingFormatMapping.cs
- SessionStateSection.cs
- SqlDataSource.cs
- DesignerForm.cs
- Component.cs
- Clipboard.cs
- OpenTypeLayoutCache.cs
- ImmutableAssemblyCacheEntry.cs
- KeyedCollection.cs
- SharedConnectionWorkflowTransactionService.cs
- WinFormsUtils.cs
- basecomparevalidator.cs
- DataGridView.cs
- _Win32.cs
- ButtonFlatAdapter.cs
- PerspectiveCamera.cs
- ConstrainedDataObject.cs
- HtmlInputSubmit.cs
- CapabilitiesAssignment.cs
- UTF7Encoding.cs
- ManagedIStream.cs
- AssemblyHash.cs
- XmlIlTypeHelper.cs
- Vector3D.cs
- Convert.cs
- SerialStream.cs
- DefaultPropertyAttribute.cs
- AttachmentCollection.cs
- SiteMapProvider.cs
- FontFamily.cs
- CheckBoxStandardAdapter.cs
- AttachmentCollection.cs
- DateTimeFormat.cs
- RefreshPropertiesAttribute.cs
- UserMapPath.cs
- OrderedDictionary.cs
- CompoundFileStorageReference.cs
- Int32.cs
- M3DUtil.cs
- ProfessionalColors.cs
- AlgoModule.cs
- WebCategoryAttribute.cs
- ByteFacetDescriptionElement.cs
- Point3DConverter.cs
- ProtocolsConfigurationEntry.cs
- GlyphingCache.cs
- AvTraceDetails.cs
- BinaryParser.cs
- shaper.cs