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
- HttpContextServiceHost.cs
- ExceptionNotification.cs
- SystemResourceHost.cs
- DoWorkEventArgs.cs
- FormsIdentity.cs
- ResourceKey.cs
- ParseNumbers.cs
- Setter.cs
- OleDbConnection.cs
- GenerateHelper.cs
- AutoSizeToolBoxItem.cs
- WhitespaceRule.cs
- AssemblyFilter.cs
- XmlSerializationGeneratedCode.cs
- EventDescriptor.cs
- SoapExtensionTypeElement.cs
- NamespaceList.cs
- DataServiceStreamResponse.cs
- CommentAction.cs
- GregorianCalendar.cs
- DiscriminatorMap.cs
- Rect3DValueSerializer.cs
- OutputCacheModule.cs
- DataGridViewRowHeaderCell.cs
- AsyncOperation.cs
- ConfigurationManagerInternalFactory.cs
- MobileControlDesigner.cs
- DbParameterCollectionHelper.cs
- AssemblyInfo.cs
- keycontainerpermission.cs
- CngProperty.cs
- Compiler.cs
- PackageRelationshipSelector.cs
- CodeTypeOfExpression.cs
- ClosureBinding.cs
- StateMachine.cs
- StatusStrip.cs
- XmlSchemaInfo.cs
- DateTimeFormat.cs
- StreamBodyWriter.cs
- DataGridViewColumnDividerDoubleClickEventArgs.cs
- DbProviderFactory.cs
- UserControlCodeDomTreeGenerator.cs
- KeyConstraint.cs
- RichTextBoxConstants.cs
- WebPartConnection.cs
- QueryOptionExpression.cs
- MailAddress.cs
- BinarySerializer.cs
- ZipIOModeEnforcingStream.cs
- DataObjectAttribute.cs
- ExecutionContext.cs
- SymLanguageVendor.cs
- FormsAuthenticationEventArgs.cs
- BidOverLoads.cs
- BaseProcessor.cs
- _TransmitFileOverlappedAsyncResult.cs
- SourceSwitch.cs
- SAPIEngineTypes.cs
- BehaviorEditorPart.cs
- Row.cs
- ListViewAutomationPeer.cs
- IProvider.cs
- OracleException.cs
- PersonalizationEntry.cs
- CommonRemoteMemoryBlock.cs
- OleDbErrorCollection.cs
- SQLDouble.cs
- X509IssuerSerialKeyIdentifierClause.cs
- DataRecordInternal.cs
- HttpFileCollection.cs
- StylusPointProperties.cs
- SerializationHelper.cs
- XmlFormatExtensionAttribute.cs
- ConfigurationFileMap.cs
- SelectionWordBreaker.cs
- ToolStripLabel.cs
- MapPathBasedVirtualPathProvider.cs
- TableSectionStyle.cs
- TemplateBindingExtension.cs
- BitConverter.cs
- SqlServices.cs
- WithStatement.cs
- FeatureAttribute.cs
- VirtualPath.cs
- DLinqAssociationProvider.cs
- RemotingConfiguration.cs
- ToolTipService.cs
- Freezable.cs
- SetStoryboardSpeedRatio.cs
- DispatcherEventArgs.cs
- mediaeventargs.cs
- GeneralTransform3D.cs
- ManagementObjectCollection.cs
- WindowsStatusBar.cs
- StateManagedCollection.cs
- XmlSchemaDocumentation.cs
- PartialTrustVisibleAssembly.cs
- TCEAdapterGenerator.cs
- ForeignKeyConstraint.cs