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
- WebPartVerb.cs
- ResolveNameEventArgs.cs
- QilExpression.cs
- WasNotInstalledException.cs
- LinkedList.cs
- FontSizeConverter.cs
- TypeSchema.cs
- CheckBoxField.cs
- Predicate.cs
- MenuAdapter.cs
- StylusPointPropertyInfoDefaults.cs
- CodeSnippetStatement.cs
- HttpSysSettings.cs
- FrameworkElementFactory.cs
- InteropDesigner.xaml.cs
- HttpCacheParams.cs
- IntegrationExceptionEventArgs.cs
- Message.cs
- NoPersistHandle.cs
- XmlFormatReaderGenerator.cs
- CodeMemberField.cs
- Msec.cs
- Helpers.cs
- MostlySingletonList.cs
- ConditionCollection.cs
- CleanUpVirtualizedItemEventArgs.cs
- XmlNamespaceMapping.cs
- SamlSecurityToken.cs
- EventRouteFactory.cs
- SessionStateContainer.cs
- ManagementPath.cs
- NoneExcludedImageIndexConverter.cs
- PropertyGeneratedEventArgs.cs
- DiscardableAttribute.cs
- XmlAttributeProperties.cs
- ValueUtilsSmi.cs
- SessionStateUtil.cs
- WinEventQueueItem.cs
- SchemaTypeEmitter.cs
- FileFormatException.cs
- InitializationEventAttribute.cs
- SystemInformation.cs
- XmlQualifiedName.cs
- X509Certificate2.cs
- TransactionOptions.cs
- EmptyControlCollection.cs
- RepeatInfo.cs
- XmlAttributeAttribute.cs
- VisualStateManager.cs
- UniformGrid.cs
- ElapsedEventArgs.cs
- ParserExtension.cs
- ReachDocumentReferenceCollectionSerializerAsync.cs
- DataServiceRequestException.cs
- DataTableMappingCollection.cs
- Vector3dCollection.cs
- RawTextInputReport.cs
- TokenBasedSetEnumerator.cs
- Point4D.cs
- DocumentGrid.cs
- Logging.cs
- RtfControls.cs
- CellRelation.cs
- RichTextBox.cs
- NativeMethods.cs
- ViewStateException.cs
- TagMapCollection.cs
- Interop.cs
- MatrixCamera.cs
- XPathMultyIterator.cs
- RegexInterpreter.cs
- _UncName.cs
- ZipPackagePart.cs
- AttributeUsageAttribute.cs
- ResourceManagerWrapper.cs
- DataSourceSelectArguments.cs
- namescope.cs
- ApplicationActivator.cs
- SeparatorAutomationPeer.cs
- PenLineJoinValidation.cs
- FrameworkRichTextComposition.cs
- TargetParameterCountException.cs
- BitConverter.cs
- Options.cs
- SchemaDeclBase.cs
- SqlTrackingWorkflowInstance.cs
- InvokeMethodActivityDesigner.cs
- Point4D.cs
- StylusPointProperty.cs
- TransactionFlowBindingElement.cs
- SoapRpcServiceAttribute.cs
- Compensate.cs
- PersonalizableAttribute.cs
- PagedDataSource.cs
- FixedStringLookup.cs
- MetadataSource.cs
- SecUtil.cs
- DoubleAnimationUsingKeyFrames.cs
- RuleRefElement.cs
- EventTrigger.cs