Code:
/ FXUpdate3074 / FXUpdate3074 / 1.1 / DEVDIV / depot / DevDiv / releases / whidbey / QFE / 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. // Copyright (c) Microsoft Corporation. All rights reserved. //------------------------------------------------------------------------------ //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. // Copyright (c) Microsoft Corporation. All rights reserved.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
- StretchValidation.cs
- ViewStateException.cs
- Vertex.cs
- ServiceDeploymentInfo.cs
- _PooledStream.cs
- FrameworkContentElement.cs
- AdornerHitTestResult.cs
- HMACSHA256.cs
- SystemIPv4InterfaceProperties.cs
- MetabaseServerConfig.cs
- _FixedSizeReader.cs
- InkCanvasFeedbackAdorner.cs
- SharedPersonalizationStateInfo.cs
- NamespaceEmitter.cs
- MatrixTransform.cs
- Point3DAnimation.cs
- MessageSmuggler.cs
- GatewayDefinition.cs
- NameValuePair.cs
- BinaryMethodMessage.cs
- TreeView.cs
- TextServicesProperty.cs
- WebBrowserUriTypeConverter.cs
- ErrorFormatter.cs
- Paragraph.cs
- Compiler.cs
- SqlRewriteScalarSubqueries.cs
- TimeStampChecker.cs
- StatusBarPanel.cs
- remotingproxy.cs
- DataGridLinkButton.cs
- TypeInitializationException.cs
- XmlCustomFormatter.cs
- ToolStripPanelRenderEventArgs.cs
- WebPartCancelEventArgs.cs
- MeshGeometry3D.cs
- QueueProcessor.cs
- LoadGrammarCompletedEventArgs.cs
- SolidColorBrush.cs
- PeerApplication.cs
- IdentityManager.cs
- OpCellTreeNode.cs
- WebFormsRootDesigner.cs
- PointF.cs
- DataGridRow.cs
- FixedPageAutomationPeer.cs
- WindowsFormsSectionHandler.cs
- figurelengthconverter.cs
- TypePropertyEditor.cs
- BamlRecordWriter.cs
- Menu.cs
- CapabilitiesRule.cs
- EventEntry.cs
- fixedPageContentExtractor.cs
- AvTraceFormat.cs
- DataGridViewBand.cs
- UserControlBuildProvider.cs
- WorkItem.cs
- ColumnClickEvent.cs
- BaseComponentEditor.cs
- ImpersonationContext.cs
- StateDesigner.LayoutSelectionGlyph.cs
- SchemaMerger.cs
- TagMapCollection.cs
- ViewValidator.cs
- WebPartConnection.cs
- DocComment.cs
- HatchBrush.cs
- SqlVisitor.cs
- _IPv4Address.cs
- PatternMatcher.cs
- SchemaImporter.cs
- RecognitionEventArgs.cs
- ValidatorCollection.cs
- RightNameExpirationInfoPair.cs
- EntityWithKeyStrategy.cs
- RecordManager.cs
- AppModelKnownContentFactory.cs
- TransportOutputChannel.cs
- KernelTypeValidation.cs
- DataServiceRequestOfT.cs
- XmlWriter.cs
- XmlObjectSerializerWriteContextComplex.cs
- ScalarType.cs
- TripleDES.cs
- BamlLocalizationDictionary.cs
- PerformanceCountersBase.cs
- ParameterModifier.cs
- SafeRightsManagementSessionHandle.cs
- RecognizerStateChangedEventArgs.cs
- XmlHierarchicalEnumerable.cs
- XmlNamespaceManager.cs
- EntitySqlException.cs
- ChtmlMobileTextWriter.cs
- ToolBarOverflowPanel.cs
- DynamicILGenerator.cs
- SetStoryboardSpeedRatio.cs
- LinkArea.cs
- RuleCache.cs
- XmlIgnoreAttribute.cs