Code:
/ Dotnetfx_Vista_SP2 / Dotnetfx_Vista_SP2 / 8.0.50727.4016 / DEVDIV / depot / DevDiv / releases / whidbey / NetFxQFE / 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
- DataGridViewCellParsingEventArgs.cs
- GetPageCompletedEventArgs.cs
- TypeDescriptor.cs
- SrgsOneOf.cs
- NativeCppClassAttribute.cs
- CodeAccessSecurityEngine.cs
- DataGridViewTopRowAccessibleObject.cs
- HebrewCalendar.cs
- MaterialGroup.cs
- ManagementEventArgs.cs
- _NegoStream.cs
- VisualState.cs
- EntityContainerEmitter.cs
- BaseParaClient.cs
- TemplatingOptionsDialog.cs
- initElementDictionary.cs
- KeyedPriorityQueue.cs
- DbProviderConfigurationHandler.cs
- WebPartEditorCancelVerb.cs
- TagPrefixAttribute.cs
- SizeAnimationBase.cs
- BooleanToVisibilityConverter.cs
- RtfControls.cs
- LockCookie.cs
- Variable.cs
- AutomationPeer.cs
- UInt16.cs
- FileChangeNotifier.cs
- ApplyImportsAction.cs
- DbDataRecord.cs
- GeneralTransformCollection.cs
- DataSourceCache.cs
- TextBoxBase.cs
- AxisAngleRotation3D.cs
- InitializingNewItemEventArgs.cs
- ClientTargetSection.cs
- DataObjectFieldAttribute.cs
- MailDefinition.cs
- XamlLoadErrorInfo.cs
- GenericIdentity.cs
- WebHttpElement.cs
- CollectionContainer.cs
- ConsumerConnectionPointCollection.cs
- PathBox.cs
- BinaryConverter.cs
- TraceContextEventArgs.cs
- SqlInternalConnection.cs
- ModuleConfigurationInfo.cs
- IndexedSelectQueryOperator.cs
- FileVersionInfo.cs
- ScrollEventArgs.cs
- RSACryptoServiceProvider.cs
- Unit.cs
- SafeEventLogReadHandle.cs
- Number.cs
- TextTreeFixupNode.cs
- JsonServiceDocumentSerializer.cs
- UIAgentCrashedException.cs
- VBCodeProvider.cs
- ZoneLinkButton.cs
- WinInetCache.cs
- OdbcConnectionHandle.cs
- HandlerFactoryWrapper.cs
- SaveFileDialog.cs
- DataGridViewCellValueEventArgs.cs
- HashMembershipCondition.cs
- EntityWithChangeTrackerStrategy.cs
- Stackframe.cs
- Literal.cs
- BaseCAMarshaler.cs
- JoinCqlBlock.cs
- StringReader.cs
- HighlightComponent.cs
- ObjectHelper.cs
- IndexedString.cs
- StrokeDescriptor.cs
- RemotingAttributes.cs
- TemplateParser.cs
- IconHelper.cs
- XmlNodeComparer.cs
- XmlSchemaCollection.cs
- FileSystemInfo.cs
- TypeDelegator.cs
- AuthorizationPolicyTypeElement.cs
- ProviderException.cs
- ObjectListSelectEventArgs.cs
- EncryptedHeaderXml.cs
- InterleavedZipPartStream.cs
- ToolStripSplitButton.cs
- DBConnectionString.cs
- DriveInfo.cs
- SiteIdentityPermission.cs
- CodeDesigner.cs
- ExtensibleClassFactory.cs
- Int16AnimationBase.cs
- CatalogPartDesigner.cs
- IisTraceListener.cs
- GeneralTransform3DGroup.cs
- RefExpr.cs
- AxisAngleRotation3D.cs