Code:
/ Dotnetfx_Win7_3.5.1 / Dotnetfx_Win7_3.5.1 / 3.5.1 / DEVDIV / depot / DevDiv / releases / whidbey / NetFXspW7 / 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
- IsolatedStorageException.cs
- AnnotationStore.cs
- MultipleViewPattern.cs
- XmlImplementation.cs
- ConfigXmlWhitespace.cs
- UmAlQuraCalendar.cs
- SmtpTransport.cs
- DirectoryRootQuery.cs
- ParseChildrenAsPropertiesAttribute.cs
- HtmlInputButton.cs
- SmtpReplyReader.cs
- RowToFieldTransformer.cs
- RoutedPropertyChangedEventArgs.cs
- CompositeKey.cs
- ApplyImportsAction.cs
- HtmlPanelAdapter.cs
- SafeNativeMethodsCLR.cs
- PageParser.cs
- DoubleAnimation.cs
- NameTable.cs
- JournalEntryListConverter.cs
- ToolStripComboBox.cs
- SignalGate.cs
- NameValuePair.cs
- HostedTransportConfigurationBase.cs
- CodeSubDirectoriesCollection.cs
- XmlUrlResolver.cs
- RichTextBoxContextMenu.cs
- ToolStripItemGlyph.cs
- Event.cs
- HotCommands.cs
- DispatcherProcessingDisabled.cs
- MiniParameterInfo.cs
- BitVector32.cs
- MachineSettingsSection.cs
- DateTimePicker.cs
- Int32Rect.cs
- FrameworkTemplate.cs
- ColumnMap.cs
- PowerStatus.cs
- GroupItemAutomationPeer.cs
- RequestCacheManager.cs
- FixedPageStructure.cs
- WrappedReader.cs
- SqlCacheDependencyDatabase.cs
- SoapEnumAttribute.cs
- HttpModulesSection.cs
- ConstraintCollection.cs
- UnsafeNativeMethods.cs
- Condition.cs
- DesignerSerializerAttribute.cs
- WebPartAddingEventArgs.cs
- DataQuery.cs
- DynamicDataExtensions.cs
- CoreChannel.cs
- FatalException.cs
- ProtocolsConfigurationHandler.cs
- SiteOfOriginContainer.cs
- DefaultProfileManager.cs
- FontCacheLogic.cs
- DBSchemaRow.cs
- SamlAction.cs
- XmlSchemaFacet.cs
- PeerUnsafeNativeCryptMethods.cs
- WindowsGraphicsWrapper.cs
- HtmlElementCollection.cs
- ConnectionPoint.cs
- HostedBindingBehavior.cs
- ColumnMapProcessor.cs
- JsonWriter.cs
- StubHelpers.cs
- AsyncParams.cs
- DependencyPropertyValueSerializer.cs
- XamlFxTrace.cs
- TypographyProperties.cs
- InstanceDataCollection.cs
- WorkflowRuntimeSection.cs
- ProxyWebPartManager.cs
- CallSite.cs
- OrthographicCamera.cs
- AspCompat.cs
- VisualBasic.cs
- KeyMatchBuilder.cs
- ParsedRoute.cs
- Binding.cs
- KeyEventArgs.cs
- AffineTransform3D.cs
- FrugalMap.cs
- TypeSystem.cs
- CqlLexerHelpers.cs
- DelegatingTypeDescriptionProvider.cs
- RequestDescription.cs
- DispatcherHooks.cs
- IntSecurity.cs
- DiffuseMaterial.cs
- XmlNodeComparer.cs
- RightsManagementInformation.cs
- HitTestDrawingContextWalker.cs
- TileModeValidation.cs
- EndpointPerformanceCounters.cs