Code:
/ 4.0 / 4.0 / DEVDIV_TFS / Dev10 / Releases / RTMRel / ndp / fx / src / xsp / System / Web / UI / WebControls / DataListItemCollection.cs / 1305376 / DataListItemCollection.cs
//------------------------------------------------------------------------------ //// Copyright (c) Microsoft Corporation. All rights reserved. // //----------------------------------------------------------------------------- /* */ namespace System.Web.UI.WebControls { using System; using System.Collections; ////// 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; ////// 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
- ScrollBar.cs
- ConnectionOrientedTransportManager.cs
- HttpDictionary.cs
- TextServicesPropertyRanges.cs
- RouteItem.cs
- DataServicePagingProviderWrapper.cs
- WindowsSysHeader.cs
- CompressStream.cs
- _ContextAwareResult.cs
- NativeMethods.cs
- QueryBranchOp.cs
- WebBaseEventKeyComparer.cs
- CodePageEncoding.cs
- WorkflowViewService.cs
- DataComponentGenerator.cs
- HttpVersion.cs
- ApplicationHost.cs
- StylusEventArgs.cs
- NotFiniteNumberException.cs
- DummyDataSource.cs
- SqlMethods.cs
- CacheMemory.cs
- QueryProcessor.cs
- ProviderUtil.cs
- DBDataPermission.cs
- TypeToTreeConverter.cs
- OracleSqlParser.cs
- PropagatorResult.cs
- SchemaConstraints.cs
- PageContentCollection.cs
- DefaultMemberAttribute.cs
- elementinformation.cs
- HttpException.cs
- DispatchChannelSink.cs
- DataGridViewTextBoxColumn.cs
- BackgroundWorker.cs
- BoolExpression.cs
- DataGridViewEditingControlShowingEventArgs.cs
- SortedDictionary.cs
- KnownIds.cs
- HuffCodec.cs
- TableLayoutSettings.cs
- MappingMetadataHelper.cs
- LicFileLicenseProvider.cs
- IdentityManager.cs
- EtwTrace.cs
- DotExpr.cs
- ConnectionConsumerAttribute.cs
- LocatorManager.cs
- FontFamilyConverter.cs
- AnnotationObservableCollection.cs
- WSFederationHttpSecurityMode.cs
- ReachFixedPageSerializer.cs
- SimpleFieldTemplateUserControl.cs
- SapiRecoInterop.cs
- LayoutExceptionEventArgs.cs
- SimpleApplicationHost.cs
- CompositeKey.cs
- Camera.cs
- DbConnectionOptions.cs
- ResourceDefaultValueAttribute.cs
- DataTable.cs
- AddIn.cs
- DictionarySurrogate.cs
- PolyQuadraticBezierSegment.cs
- CodePropertyReferenceExpression.cs
- XhtmlTextWriter.cs
- HebrewNumber.cs
- SchemaObjectWriter.cs
- RootNamespaceAttribute.cs
- GridView.cs
- CssStyleCollection.cs
- SqlDataRecord.cs
- RequestStatusBarUpdateEventArgs.cs
- Types.cs
- ZipIOLocalFileDataDescriptor.cs
- HebrewNumber.cs
- CodeDelegateCreateExpression.cs
- RectangleHotSpot.cs
- ConfigXmlComment.cs
- OracleBinary.cs
- ReferentialConstraint.cs
- _Semaphore.cs
- BulletedList.cs
- UnsafeNativeMethodsTablet.cs
- WebBrowserNavigatingEventHandler.cs
- ThreadExceptionEvent.cs
- BamlResourceContent.cs
- SchemaInfo.cs
- DummyDataSource.cs
- OracleConnectionStringBuilder.cs
- Compilation.cs
- DiscoveryClientOutputChannel.cs
- UICuesEvent.cs
- SignatureHelper.cs
- Parser.cs
- SolidColorBrush.cs
- RectConverter.cs
- GeneralTransform3DTo2DTo3D.cs
- PrivilegeNotHeldException.cs