Code:
/ DotNET / DotNET / 8.0 / untmp / whidbey / REDBITS / 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;
///
/// Represents the collection of objects
///
[AspNetHostingPermission(SecurityAction.LinkDemand, Level=AspNetHostingPermissionLevel.Minimal)]
public sealed class DataListItemCollection : ICollection {
private ArrayList items;
///
/// Initializes a new instance of the class.
///
public DataListItemCollection(ArrayList items) {
this.items = items;
}
///
/// Gets the number of items in the collection.
///
public int Count {
get {
return items.Count;
}
}
///
/// Gets a value that specifies whether items in the can be modified.
///
public bool IsReadOnly {
get {
return false;
}
}
///
/// Gets a value that indicates whether the is thread-safe.
///
public bool IsSynchronized {
get {
return false;
}
}
///
/// Gets the object used to synchronize access to the collection.
///
public object SyncRoot {
get {
return this;
}
}
///
/// Gets a at the specified index in the
/// collection.
///
public DataListItem this[int index] {
get {
return(DataListItem)items[index];
}
}
///
/// Copies the contents of the entire collection into an appending at
/// the specified index of the .
///
public void CopyTo(Array array, int index) {
for (IEnumerator e = this.GetEnumerator(); e.MoveNext();)
array.SetValue(e.Current, index++);
}
///
/// Creates an enumerator for the used to iterate
/// through the collection.
///
public IEnumerator GetEnumerator() {
return items.GetEnumerator();
}
}
}
Link Menu

This book is available now!
Buy at Amazon US or
Buy at Amazon UK
- MultitargetUtil.cs
- WebPartCancelEventArgs.cs
- XDeferredAxisSource.cs
- FrameworkTextComposition.cs
- _Win32.cs
- XPathNavigator.cs
- UIElementParaClient.cs
- DesignerActionGlyph.cs
- FileDialog_Vista.cs
- PersistenceTypeAttribute.cs
- FormViewCommandEventArgs.cs
- ScriptResourceAttribute.cs
- NativeMethods.cs
- GridViewDeleteEventArgs.cs
- TransactionManager.cs
- WebServiceReceiveDesigner.cs
- ApplyImportsAction.cs
- LocatorPart.cs
- CodeDOMUtility.cs
- QueryStringParameter.cs
- XmlDictionaryReaderQuotasElement.cs
- ElementMarkupObject.cs
- EdmSchemaAttribute.cs
- CqlLexer.cs
- DataGridViewColumnHeaderCell.cs
- IxmlLineInfo.cs
- EndOfStreamException.cs
- ResolveNameEventArgs.cs
- DataListItem.cs
- KeyValuePair.cs
- NumericPagerField.cs
- NameSpaceEvent.cs
- DataServiceConfiguration.cs
- ServiceNameElement.cs
- CodeAccessSecurityEngine.cs
- XsdCachingReader.cs
- HostedImpersonationContext.cs
- DictionaryMarkupSerializer.cs
- PartManifestEntry.cs
- FormViewInsertedEventArgs.cs
- SwitchDesigner.xaml.cs
- X509Certificate2Collection.cs
- TextTreeRootTextBlock.cs
- ToolStrip.cs
- Util.cs
- DataGridItem.cs
- InitializingNewItemEventArgs.cs
- __TransparentProxy.cs
- RightsManagementEncryptedStream.cs
- RelationshipDetailsCollection.cs
- BaseCodeDomTreeGenerator.cs
- FreeFormDragDropManager.cs
- Variable.cs
- MouseEvent.cs
- Sentence.cs
- EventLogEntryCollection.cs
- HtmlInputReset.cs
- FormsAuthenticationCredentials.cs
- ProviderCollection.cs
- WindowsGrip.cs
- ExpressionTextBox.xaml.cs
- EntryPointNotFoundException.cs
- SHA256Cng.cs
- ProjectionCamera.cs
- ObjectContext.cs
- NamedPermissionSet.cs
- IndentedTextWriter.cs
- IItemProperties.cs
- Point3DIndependentAnimationStorage.cs
- SystemPens.cs
- ToolboxItemLoader.cs
- DbReferenceCollection.cs
- DataAdapter.cs
- WmlLabelAdapter.cs
- SiteMapNodeItem.cs
- OletxVolatileEnlistment.cs
- RadioButtonBaseAdapter.cs
- DynamicObject.cs
- ToolboxDataAttribute.cs
- PageRouteHandler.cs
- GB18030Encoding.cs
- SemanticValue.cs
- SpecularMaterial.cs
- EditCommandColumn.cs
- BamlBinaryReader.cs
- CellLabel.cs
- DbException.cs
- _NegotiateClient.cs
- ProbeMatches11.cs
- SettingsContext.cs
- ResourceExpressionBuilder.cs
- RouteTable.cs
- XmlLanguageConverter.cs
- SyndicationFeed.cs
- Scalars.cs
- ValidationRule.cs
- columnmapfactory.cs
- NamedPipeChannelFactory.cs
- SystemIPv6InterfaceProperties.cs
- BindingMemberInfo.cs