Code:
/ Net / Net / 3.5.50727.3053 / DEVDIV / depot / DevDiv / releases / whidbey / netfxsp / 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
- Drawing.cs
- TagMapCollection.cs
- UnconditionalPolicy.cs
- QueryResponse.cs
- MetadataException.cs
- TagNameToTypeMapper.cs
- ReaderWriterLockWrapper.cs
- Blend.cs
- XmlAttributeOverrides.cs
- HitTestWithPointDrawingContextWalker.cs
- FormsAuthenticationTicket.cs
- Style.cs
- Types.cs
- AccessDataSource.cs
- securitycriticaldataClass.cs
- basecomparevalidator.cs
- FacetChecker.cs
- filewebrequest.cs
- LoginView.cs
- TableAdapterManagerMethodGenerator.cs
- DataTableTypeConverter.cs
- DataList.cs
- Decorator.cs
- HtmlElementErrorEventArgs.cs
- ColorMatrix.cs
- ContainerParaClient.cs
- HijriCalendar.cs
- BinaryMethodMessage.cs
- SqlPersonalizationProvider.cs
- StateManagedCollection.cs
- Line.cs
- EventPrivateKey.cs
- ProxyWebPart.cs
- SqlTypeSystemProvider.cs
- Image.cs
- DynamicUpdateCommand.cs
- XmlSchemaComplexContentRestriction.cs
- LongAverageAggregationOperator.cs
- ResourceReader.cs
- FirstMatchCodeGroup.cs
- AssemblyInfo.cs
- DeflateStreamAsyncResult.cs
- CaseKeyBox.ViewModel.cs
- Help.cs
- MessageHeaderAttribute.cs
- DataGridColumnHeaderAutomationPeer.cs
- SymmetricAlgorithm.cs
- CustomCredentialPolicy.cs
- InternalControlCollection.cs
- CompoundFileDeflateTransform.cs
- ToolStripRenderEventArgs.cs
- Trace.cs
- ClientTargetCollection.cs
- ApplicationManager.cs
- LineGeometry.cs
- DataContractSerializerFaultFormatter.cs
- IApplicationTrustManager.cs
- WindowsTooltip.cs
- DbConnectionPoolGroupProviderInfo.cs
- IntegerFacetDescriptionElement.cs
- Rectangle.cs
- Mapping.cs
- Size.cs
- MatchAttribute.cs
- Path.cs
- HttpDebugHandler.cs
- Operator.cs
- PackageRelationshipSelector.cs
- RequestResizeEvent.cs
- Command.cs
- ProtocolElementCollection.cs
- AnnotationResource.cs
- InteropTrackingRecord.cs
- CqlLexerHelpers.cs
- DataGridViewHeaderCell.cs
- RawStylusInputCustomData.cs
- NumberFormatInfo.cs
- CodeTryCatchFinallyStatement.cs
- DbDataRecord.cs
- ScriptRegistrationManager.cs
- UnsafeNativeMethods.cs
- ProcessInputEventArgs.cs
- DataSourceBooleanViewSchemaConverter.cs
- AnimationClockResource.cs
- SqlPersistenceWorkflowInstanceDescription.cs
- ListItemsPage.cs
- CompiledQuery.cs
- XmlStreamNodeWriter.cs
- WorkItem.cs
- oledbmetadatacolumnnames.cs
- UInt64.cs
- TextDecorationCollection.cs
- XpsS0ValidatingLoader.cs
- SettingsProviderCollection.cs
- StringReader.cs
- UnsafeNativeMethodsMilCoreApi.cs
- WindowsFormsSynchronizationContext.cs
- ByteStream.cs
- XPathMultyIterator.cs
- ZipIOLocalFileHeader.cs