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
- GiveFeedbackEventArgs.cs
- Pair.cs
- KeysConverter.cs
- SelectionEditingBehavior.cs
- IDQuery.cs
- WebRequest.cs
- RegisteredDisposeScript.cs
- WeakEventManager.cs
- AsyncOperation.cs
- Matrix3D.cs
- FontSizeConverter.cs
- CallSiteHelpers.cs
- QilName.cs
- M3DUtil.cs
- SparseMemoryStream.cs
- ResetableIterator.cs
- BuildProviderAppliesToAttribute.cs
- CellLabel.cs
- ListItemCollection.cs
- XhtmlBasicFormAdapter.cs
- UpdateTracker.cs
- AssemblyBuilder.cs
- TextTreePropertyUndoUnit.cs
- Number.cs
- GlobalizationSection.cs
- WS2007FederationHttpBindingCollectionElement.cs
- XmlQueryOutput.cs
- Separator.cs
- CorrelationTokenInvalidatedHandler.cs
- BinaryObjectInfo.cs
- XmlILCommand.cs
- ReferenceList.cs
- MsmqBindingElementBase.cs
- ReflectPropertyDescriptor.cs
- PermissionToken.cs
- Duration.cs
- RepeaterItem.cs
- EntityDesignerUtils.cs
- FixedLineResult.cs
- OletxCommittableTransaction.cs
- BitStream.cs
- TypeDependencyAttribute.cs
- EndpointBehaviorElement.cs
- CorrelationManager.cs
- WindowsFormsSectionHandler.cs
- PrintingPermission.cs
- DataGridrowEditEndingEventArgs.cs
- DbConnectionClosed.cs
- SchemaSetCompiler.cs
- ProcessModelSection.cs
- safePerfProviderHandle.cs
- FormatConvertedBitmap.cs
- SystemUnicastIPAddressInformation.cs
- DesignerSerializationOptionsAttribute.cs
- GroupAggregateExpr.cs
- shaper.cs
- ToolStripSeparator.cs
- SparseMemoryStream.cs
- _CacheStreams.cs
- X509ChainElement.cs
- XmlAggregates.cs
- ParserExtension.cs
- SoapExtensionImporter.cs
- SqlIdentifier.cs
- ConfigurationSettings.cs
- FontSourceCollection.cs
- RuntimeHelpers.cs
- WindowsRebar.cs
- EntityDataSourceEntityTypeFilterConverter.cs
- EventMappingSettings.cs
- Converter.cs
- GroupItem.cs
- oledbmetadatacolumnnames.cs
- DataBindingCollection.cs
- EnumerableValidator.cs
- WCFBuildProvider.cs
- RangeBaseAutomationPeer.cs
- FixedSchema.cs
- MDIWindowDialog.cs
- KeyValueInternalCollection.cs
- FormsAuthenticationModule.cs
- ArgumentDirectionHelper.cs
- Thread.cs
- BindUriHelper.cs
- XsltArgumentList.cs
- HtmlFormWrapper.cs
- Hex.cs
- IntegrationExceptionEventArgs.cs
- HtmlHistory.cs
- CreateUserWizardStep.cs
- Serializer.cs
- BitmapDecoder.cs
- BinaryConverter.cs
- BitVector32.cs
- DataServiceQuery.cs
- QilLiteral.cs
- ProfileInfo.cs
- ManagementEventArgs.cs
- cookieexception.cs
- FolderBrowserDialog.cs