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
- SBCSCodePageEncoding.cs
- Monitor.cs
- ConnectionPoolManager.cs
- FlowDocumentPageViewerAutomationPeer.cs
- Expander.cs
- TextEffectCollection.cs
- ObjectViewFactory.cs
- BinaryFormatter.cs
- StyleModeStack.cs
- StyleModeStack.cs
- SqlDuplicator.cs
- ServiceNameCollection.cs
- XmlQualifiedName.cs
- PopupRootAutomationPeer.cs
- WS2007FederationHttpBinding.cs
- SqlParameter.cs
- RowSpanVector.cs
- PageSettings.cs
- WorkflowInvoker.cs
- SqlMethodCallConverter.cs
- ProjectionPathBuilder.cs
- Win32Exception.cs
- UIAgentCrashedException.cs
- FileDataSourceCache.cs
- ListViewDeleteEventArgs.cs
- Span.cs
- AvTraceDetails.cs
- Tracking.cs
- QueryableFilterUserControl.cs
- ExpandableObjectConverter.cs
- OutputCacheProfileCollection.cs
- XmlCodeExporter.cs
- HtmlAnchor.cs
- ListControl.cs
- Decoder.cs
- TextTabProperties.cs
- MsmqPoisonMessageException.cs
- unsafeIndexingFilterStream.cs
- HyperLink.cs
- VideoDrawing.cs
- Wizard.cs
- AdapterUtil.cs
- Cursor.cs
- WebExceptionStatus.cs
- KeyToListMap.cs
- ProfilePropertyMetadata.cs
- ImageInfo.cs
- CodeIdentifier.cs
- Point.cs
- SmtpNtlmAuthenticationModule.cs
- ButtonFieldBase.cs
- PropVariant.cs
- OleDbWrapper.cs
- EventItfInfo.cs
- QueryCacheEntry.cs
- ByteAnimation.cs
- Path.cs
- BamlLocalizer.cs
- ResourceDescriptionAttribute.cs
- cryptoapiTransform.cs
- ButtonChrome.cs
- TreeSet.cs
- PostBackOptions.cs
- XmlAnyElementAttribute.cs
- Odbc32.cs
- EventProviderTraceListener.cs
- DataGridViewCellFormattingEventArgs.cs
- ContainerFilterService.cs
- WebBrowserContainer.cs
- FrameworkElement.cs
- Hashtable.cs
- SQLUtility.cs
- ConfigurationLocation.cs
- ThreadStateException.cs
- ScriptReference.cs
- EntityContainerRelationshipSetEnd.cs
- ConfigurationElementCollection.cs
- SqlDataSourceQuery.cs
- AuthenticationException.cs
- LockCookie.cs
- EntityDataSourceWizardForm.cs
- XmlElementList.cs
- SafeThreadHandle.cs
- Compilation.cs
- DocumentViewerBase.cs
- TraceListener.cs
- CodeAttributeDeclaration.cs
- LocalFileSettingsProvider.cs
- CompositeTypefaceMetrics.cs
- ImageFormat.cs
- Aggregates.cs
- LinearQuaternionKeyFrame.cs
- TextElement.cs
- JournalEntryListConverter.cs
- ValidatorCompatibilityHelper.cs
- DataGridColumn.cs
- ColumnHeaderCollectionEditor.cs
- ConvertersCollection.cs
- TokenDescriptor.cs
- _ConnectStream.cs