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
- CacheHelper.cs
- ThemeableAttribute.cs
- ServiceModelConfigurationSectionGroup.cs
- XamlFilter.cs
- XmlSchemaAttributeGroupRef.cs
- IISMapPath.cs
- Int32.cs
- ExtensionFile.cs
- Identity.cs
- BamlLocalizableResourceKey.cs
- SiteMapSection.cs
- Version.cs
- GradientBrush.cs
- GACMembershipCondition.cs
- Command.cs
- ToolBarPanel.cs
- InstanceLockQueryResult.cs
- ToolBarButtonDesigner.cs
- SiteOfOriginPart.cs
- SurrogateDataContract.cs
- DataDocumentXPathNavigator.cs
- ChannelSinkStacks.cs
- ListManagerBindingsCollection.cs
- HTMLTagNameToTypeMapper.cs
- PathFigureCollection.cs
- XmlAnyAttributeAttribute.cs
- SqlColumnizer.cs
- AttachedPropertyMethodSelector.cs
- TypeLoadException.cs
- ListBoxItemAutomationPeer.cs
- EventItfInfo.cs
- FunctionNode.cs
- ListControlConvertEventArgs.cs
- DataGridViewCellPaintingEventArgs.cs
- Freezable.cs
- PeerCustomResolverElement.cs
- TextRangeEditTables.cs
- BrowsableAttribute.cs
- AccessedThroughPropertyAttribute.cs
- Transform.cs
- ControlHelper.cs
- DbConnectionStringCommon.cs
- WebPartConnectionsConnectVerb.cs
- Substitution.cs
- DocumentApplication.cs
- RadioButton.cs
- RepeaterDataBoundAdapter.cs
- TransactedReceiveData.cs
- Script.cs
- DocobjHost.cs
- DataGridTable.cs
- ListView.cs
- RouteParametersHelper.cs
- SqlConnectionManager.cs
- RemotingConfiguration.cs
- MissingMemberException.cs
- RandomNumberGenerator.cs
- DesignRelationCollection.cs
- SurrogateSelector.cs
- StylusLogic.cs
- SHA384Managed.cs
- Parallel.cs
- SafeNativeMethods.cs
- DrawingContextWalker.cs
- HwndHost.cs
- DataSourceControl.cs
- SignatureToken.cs
- EventQueueState.cs
- ConfigErrorGlyph.cs
- TdsParserStateObject.cs
- InkCanvasAutomationPeer.cs
- Identifier.cs
- SecurityMode.cs
- UIElement3DAutomationPeer.cs
- ExpressionBuilderContext.cs
- DbFunctionCommandTree.cs
- StylusButtonCollection.cs
- TimerElapsedEvenArgs.cs
- IDQuery.cs
- WebPartCatalogCloseVerb.cs
- MachineKeySection.cs
- NaturalLanguageHyphenator.cs
- RSAPKCS1SignatureDeformatter.cs
- DeleteIndexBinder.cs
- GenerateScriptTypeAttribute.cs
- SqlClientFactory.cs
- OleDbParameterCollection.cs
- ChameleonKey.cs
- EmbeddedObject.cs
- Base64Encoding.cs
- WebPartHelpVerb.cs
- Base64Stream.cs
- RootBrowserWindowAutomationPeer.cs
- BindingExpression.cs
- StreamReader.cs
- RowSpanVector.cs
- XmlNavigatorFilter.cs
- DataSourceCache.cs
- DbDataSourceEnumerator.cs
- FormsAuthentication.cs