Code:
/ Dotnetfx_Vista_SP2 / Dotnetfx_Vista_SP2 / 8.0.50727.4016 / DEVDIV / depot / DevDiv / releases / whidbey / NetFxQFE / ndp / fx / src / xsp / System / Web / UI / WebControls / DataListItemCollection.cs / 1 / DataListItemCollection.cs
//------------------------------------------------------------------------------ //// Copyright (c) Microsoft Corporation. All rights reserved. // //----------------------------------------------------------------------------- /* */ namespace System.Web.UI.WebControls { using System; using System.Collections; using System.Security.Permissions; ////// [AspNetHostingPermission(SecurityAction.LinkDemand, Level=AspNetHostingPermissionLevel.Minimal)] 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; using System.Security.Permissions; ////// [AspNetHostingPermission(SecurityAction.LinkDemand, Level=AspNetHostingPermissionLevel.Minimal)] 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
- XmlLanguageConverter.cs
- ConfigurationManagerHelper.cs
- TextChangedEventArgs.cs
- LinkUtilities.cs
- WebMessageBodyStyleHelper.cs
- NativeMethods.cs
- Transform.cs
- ZipIOLocalFileDataDescriptor.cs
- Vector3DCollectionConverter.cs
- BStrWrapper.cs
- Win32PrintDialog.cs
- LabelEditEvent.cs
- ClientConfigurationHost.cs
- PrefixHandle.cs
- CreateUserWizardStep.cs
- VerbConverter.cs
- InfoCardUIAgent.cs
- BasicExpandProvider.cs
- AsymmetricSignatureFormatter.cs
- RemoveFromCollection.cs
- ReadOnlyDataSource.cs
- PersonalizationStateQuery.cs
- TraceRecord.cs
- MissingManifestResourceException.cs
- TreeView.cs
- ExtensibleClassFactory.cs
- EdmRelationshipRoleAttribute.cs
- KeyEvent.cs
- ProtocolInformationReader.cs
- OracleRowUpdatedEventArgs.cs
- TrackingServices.cs
- SelectionRange.cs
- UIElementParaClient.cs
- DataGridItemEventArgs.cs
- GridViewPageEventArgs.cs
- TaiwanLunisolarCalendar.cs
- LayoutTableCell.cs
- TimeZone.cs
- X509Certificate.cs
- ZipIOZip64EndOfCentralDirectoryLocatorBlock.cs
- CodeIdentifiers.cs
- User.cs
- PathSegmentCollection.cs
- Control.cs
- DataListGeneralPage.cs
- FixedDocumentPaginator.cs
- TextShapeableCharacters.cs
- ElementFactory.cs
- InvalidAsynchronousStateException.cs
- IndexedString.cs
- OpenTypeLayout.cs
- Parser.cs
- Avt.cs
- UpdateCommandGenerator.cs
- ComAdminWrapper.cs
- CommandManager.cs
- NotFiniteNumberException.cs
- ResourceLoader.cs
- ReadOnlyCollection.cs
- WindowsFormsSectionHandler.cs
- DrawingContextWalker.cs
- GeneralTransformCollection.cs
- TableLayoutColumnStyleCollection.cs
- CompoundFileStreamReference.cs
- WebPartRestoreVerb.cs
- UnmanagedMemoryAccessor.cs
- PlaceHolder.cs
- AssemblyAttributes.cs
- TextBreakpoint.cs
- WindowsScroll.cs
- OptimizedTemplateContentHelper.cs
- TargetParameterCountException.cs
- UserNamePasswordValidator.cs
- WebScriptEndpointElement.cs
- CodeTypeConstructor.cs
- SqlDataReader.cs
- CompositeFontInfo.cs
- ToolStripTextBox.cs
- ComponentCache.cs
- CodeCompileUnit.cs
- CompressStream.cs
- FunctionCommandText.cs
- PixelFormatConverter.cs
- SelectionListComponentEditor.cs
- EndOfStreamException.cs
- DbConnectionStringBuilder.cs
- FormsAuthenticationModule.cs
- CodeVariableDeclarationStatement.cs
- SettingsPropertyNotFoundException.cs
- AsyncResult.cs
- WebZone.cs
- RSAPKCS1KeyExchangeDeformatter.cs
- ServiceInfo.cs
- ZoneLinkButton.cs
- UserMapPath.cs
- HtmlInputSubmit.cs
- XmlReaderSettings.cs
- Selection.cs
- DataGridViewImageCell.cs
- TreeView.cs