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
- CodeIdentifiers.cs
- WmlPanelAdapter.cs
- MarkupExtensionSerializer.cs
- CustomSignedXml.cs
- GenerateHelper.cs
- Component.cs
- Form.cs
- DependentTransaction.cs
- CompilerTypeWithParams.cs
- AccessText.cs
- DirectionalLight.cs
- UserControl.cs
- TreeIterator.cs
- Menu.cs
- PublisherIdentityPermission.cs
- Deflater.cs
- WorkflowServiceHostFactory.cs
- WeakEventTable.cs
- EarlyBoundInfo.cs
- HybridObjectCache.cs
- ReadOnlyDictionary.cs
- WeakReferenceEnumerator.cs
- CustomErrorsSection.cs
- PageAction.cs
- XmlSchemaAll.cs
- SingleAnimation.cs
- CollectionBuilder.cs
- Storyboard.cs
- CodeSubDirectoriesCollection.cs
- SharedPerformanceCounter.cs
- TimelineCollection.cs
- OleDbSchemaGuid.cs
- TextDecorationCollectionConverter.cs
- XmlSchemaNotation.cs
- AtomicFile.cs
- NonNullItemCollection.cs
- Permission.cs
- PeerInputChannelListener.cs
- IdentityNotMappedException.cs
- FormViewDeletedEventArgs.cs
- Floater.cs
- TextSpan.cs
- CryptoConfig.cs
- DataListItem.cs
- MetadataSource.cs
- CqlLexer.cs
- TreeViewImageIndexConverter.cs
- WebPartZone.cs
- SoapFault.cs
- PerformanceCounterManager.cs
- TimeSpanValidator.cs
- DateTimeFormat.cs
- ScriptManagerProxy.cs
- HighlightComponent.cs
- ResourcePart.cs
- ChtmlCommandAdapter.cs
- CultureTableRecord.cs
- Transform3DGroup.cs
- XmlDataSourceNodeDescriptor.cs
- ContextInformation.cs
- DataBindingCollection.cs
- ResourceManager.cs
- ToolStripRenderEventArgs.cs
- DataTable.cs
- XmlSchemaObjectTable.cs
- SamlNameIdentifierClaimResource.cs
- ErrorReporting.cs
- SelectionWordBreaker.cs
- RequestCacheEntry.cs
- ChannelManager.cs
- Pen.cs
- XmlBufferedByteStreamReader.cs
- CodeSpit.cs
- _ShellExpression.cs
- objectquery_tresulttype.cs
- PropertyPathWorker.cs
- LocalizationParserHooks.cs
- PersonalizationEntry.cs
- DebugView.cs
- SolidColorBrush.cs
- AutomationFocusChangedEventArgs.cs
- HttpMethodAttribute.cs
- QuestionEventArgs.cs
- Light.cs
- ResourceProperty.cs
- BigInt.cs
- PipeStream.cs
- Task.cs
- MediaElement.cs
- RoutedEventConverter.cs
- DataGridLength.cs
- ComponentResourceKeyConverter.cs
- GeometryConverter.cs
- DBConcurrencyException.cs
- DesignerFrame.cs
- WebBrowserDocumentCompletedEventHandler.cs
- IsolatedStorage.cs
- OdbcCommand.cs
- CultureTableRecord.cs
- SafeRightsManagementEnvironmentHandle.cs