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
- StrokeCollectionDefaultValueFactory.cs
- PointLightBase.cs
- ToolStripPanelCell.cs
- SafeUserTokenHandle.cs
- BrowserCapabilitiesCompiler.cs
- ScriptComponentDescriptor.cs
- SimpleExpression.cs
- WebPartHeaderCloseVerb.cs
- GroupBox.cs
- DataGridColumnReorderingEventArgs.cs
- SQLInt32.cs
- WindowsIdentity.cs
- SystemColors.cs
- SurrogateChar.cs
- HtmlTableCell.cs
- ItemCheckEvent.cs
- PackagePart.cs
- RequiredFieldValidator.cs
- AbandonedMutexException.cs
- DataControlFieldHeaderCell.cs
- SqlSupersetValidator.cs
- CodeGotoStatement.cs
- HttpHandlerActionCollection.cs
- unsafeIndexingFilterStream.cs
- BulletChrome.cs
- CodeNamespaceImport.cs
- CodeDomSerializerException.cs
- XamlTypeWithExplicitNamespace.cs
- ContentValidator.cs
- ScrollItemProviderWrapper.cs
- DesignOnlyAttribute.cs
- LinearQuaternionKeyFrame.cs
- RichTextBox.cs
- Trace.cs
- ZipFileInfoCollection.cs
- WSHttpTransportSecurityElement.cs
- MessageSecurityOverTcp.cs
- ChangePassword.cs
- EntityDataSourceEntityTypeFilterItem.cs
- Attributes.cs
- StringConverter.cs
- _ScatterGatherBuffers.cs
- SqlClientPermission.cs
- SqlCacheDependencySection.cs
- CodeConstructor.cs
- TableColumn.cs
- Processor.cs
- SvcMapFileSerializer.cs
- TableCell.cs
- IxmlLineInfo.cs
- Stackframe.cs
- XmlAttributeOverrides.cs
- SemanticAnalyzer.cs
- COM2ExtendedTypeConverter.cs
- TextTreeNode.cs
- AccessDataSourceWizardForm.cs
- EndEvent.cs
- ConfigurationPermission.cs
- NetTcpBindingCollectionElement.cs
- WindowHideOrCloseTracker.cs
- Base64Stream.cs
- TextHidden.cs
- GenericEnumerator.cs
- OutputWindow.cs
- LinkLabel.cs
- StrokeCollectionDefaultValueFactory.cs
- ConfigXmlSignificantWhitespace.cs
- WorkflowRuntimeServiceElement.cs
- Vars.cs
- XmlNamedNodeMap.cs
- MediaEntryAttribute.cs
- ViewgenContext.cs
- HMACSHA512.cs
- EncryptedKeyIdentifierClause.cs
- StringUtil.cs
- XamlWriter.cs
- ComponentEditorPage.cs
- XhtmlTextWriter.cs
- DBCommand.cs
- SimpleApplicationHost.cs
- NullableIntAverageAggregationOperator.cs
- ScriptIgnoreAttribute.cs
- Size.cs
- FamilyCollection.cs
- SystemIPv6InterfaceProperties.cs
- WebPartCancelEventArgs.cs
- Line.cs
- SystemColors.cs
- PersonalizationStateInfo.cs
- WindowsFormsHost.cs
- Executor.cs
- ContextStack.cs
- Timer.cs
- Application.cs
- DbProviderFactories.cs
- DataServiceQueryProvider.cs
- MenuItemStyleCollection.cs
- MultiBindingExpression.cs
- FileInfo.cs
- ComplexLine.cs