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
- _UriTypeConverter.cs
- IndexedString.cs
- TableDetailsRow.cs
- DefaultMemberAttribute.cs
- documentsequencetextview.cs
- CollectionChange.cs
- ChildDocumentBlock.cs
- IUnknownConstantAttribute.cs
- FocusTracker.cs
- TemplatedWizardStep.cs
- DoubleLinkList.cs
- TextEditorMouse.cs
- lengthconverter.cs
- Control.cs
- XmlSchemas.cs
- ColorConvertedBitmapExtension.cs
- PropertyInformation.cs
- ResourceContainer.cs
- WorkflowRuntimeElement.cs
- RepeatBehaviorConverter.cs
- MaskPropertyEditor.cs
- SystemInformation.cs
- HttpContext.cs
- XsltFunctions.cs
- AttachedAnnotation.cs
- InstanceData.cs
- FilterableAttribute.cs
- DateTimeParse.cs
- _SSPISessionCache.cs
- RequestContext.cs
- XmlSchemaCollection.cs
- TextTreeDeleteContentUndoUnit.cs
- ConfigurationManagerInternalFactory.cs
- HashHelper.cs
- ListViewItem.cs
- ArrayItemValue.cs
- ConnectionStringsExpressionBuilder.cs
- KnownColorTable.cs
- DBConnectionString.cs
- GenericUriParser.cs
- HttpCookie.cs
- Rijndael.cs
- DataException.cs
- SendActivityDesigner.cs
- ScriptResourceInfo.cs
- LineUtil.cs
- ReferenceService.cs
- SingleAnimationUsingKeyFrames.cs
- BufferedGraphics.cs
- OleDbReferenceCollection.cs
- DirectoryNotFoundException.cs
- DockPatternIdentifiers.cs
- AssemblyContextControlItem.cs
- CapabilitiesSection.cs
- KeyBinding.cs
- BamlStream.cs
- MouseGestureConverter.cs
- InputReportEventArgs.cs
- DynamicMethod.cs
- PiiTraceSource.cs
- StylusDownEventArgs.cs
- ScrollItemProviderWrapper.cs
- StorageConditionPropertyMapping.cs
- TextCompositionEventArgs.cs
- SecurityPermission.cs
- Mouse.cs
- TypeConvertions.cs
- EntityDataSourceReferenceGroup.cs
- OdbcInfoMessageEvent.cs
- PaperSource.cs
- MaterialCollection.cs
- XmlTextReader.cs
- CollectionType.cs
- TypedRowHandler.cs
- CharacterMetricsDictionary.cs
- ToolStripContentPanel.cs
- SqlCacheDependencyDatabaseCollection.cs
- UnSafeCharBuffer.cs
- FlatButtonAppearance.cs
- IIS7UserPrincipal.cs
- AnnotationAuthorChangedEventArgs.cs
- DefaultConfirmation.cs
- ColumnPropertiesGroup.cs
- FontWeight.cs
- UnionCodeGroup.cs
- ProgressBar.cs
- TimeSpanMinutesConverter.cs
- FilterException.cs
- CopyCodeAction.cs
- ImagingCache.cs
- MasterPageCodeDomTreeGenerator.cs
- ElapsedEventArgs.cs
- AtomMaterializerLog.cs
- RotateTransform3D.cs
- XmlSchemaAnyAttribute.cs
- AutomationPropertyInfo.cs
- RemotingSurrogateSelector.cs
- XDeferredAxisSource.cs
- ResolvedKeyFrameEntry.cs
- EmbeddedObject.cs