Code:
/ 4.0 / 4.0 / DEVDIV_TFS / Dev10 / Releases / RTMRel / ndp / fx / src / xsp / System / Web / UI / WebControls / DataKeyCollection.cs / 1305376 / DataKeyCollection.cs
//------------------------------------------------------------------------------
//
// Copyright (c) Microsoft Corporation. All rights reserved.
//
//-----------------------------------------------------------------------------
namespace System.Web.UI.WebControls {
using System;
using System.Collections;
///
///
public sealed class DataKeyCollection : ICollection {
private ArrayList keys;
///
/// Initializes a new instance of the class.
///
public DataKeyCollection(ArrayList keys) {
this.keys = keys;
}
///
/// Gets the number of objects in the collection. This property is read-only.
///
public int Count {
get {
return keys.Count;
}
}
///
/// Gets the value that specifies whether items in the can be
/// modified. This property is read-only.
///
public bool IsReadOnly {
get {
return false;
}
}
///
/// Gets a value that indicates whether the is
/// thread-safe. This property is read-only.
///
public bool IsSynchronized {
get {
return false;
}
}
///
/// Gets the object used to synchronize access to the collection. This property is read-only.
///
public object SyncRoot {
get {
return this;
}
}
///
/// Gets a at the specified index in the collection. This property is read-only.
///
public object this[int index] {
get {
return keys[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 keys.GetEnumerator();
}
}
}
// File provided for Reference Use Only by Microsoft Corporation (c) 2007.
//------------------------------------------------------------------------------
//
// Copyright (c) Microsoft Corporation. All rights reserved.
//
//-----------------------------------------------------------------------------
namespace System.Web.UI.WebControls {
using System;
using System.Collections;
///
///
public sealed class DataKeyCollection : ICollection {
private ArrayList keys;
///
/// Initializes a new instance of the class.
///
public DataKeyCollection(ArrayList keys) {
this.keys = keys;
}
///
/// Gets the number of objects in the collection. This property is read-only.
///
public int Count {
get {
return keys.Count;
}
}
///
/// Gets the value that specifies whether items in the can be
/// modified. This property is read-only.
///
public bool IsReadOnly {
get {
return false;
}
}
///
/// Gets a value that indicates whether the is
/// thread-safe. This property is read-only.
///
public bool IsSynchronized {
get {
return false;
}
}
///
/// Gets the object used to synchronize access to the collection. This property is read-only.
///
public object SyncRoot {
get {
return this;
}
}
///
/// Gets a at the specified index in the collection. This property is read-only.
///
public object this[int index] {
get {
return keys[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 keys.GetEnumerator();
}
}
}
// File provided for Reference Use Only by Microsoft Corporation (c) 2007.
Link Menu

This book is available now!
Buy at Amazon US or
Buy at Amazon UK
- SystemIPv6InterfaceProperties.cs
- RSAPKCS1KeyExchangeDeformatter.cs
- XamlTemplateSerializer.cs
- Pointer.cs
- ExpressionHelper.cs
- ProjectionCamera.cs
- HttpListenerContext.cs
- SafeArrayTypeMismatchException.cs
- ColorAnimationUsingKeyFrames.cs
- CanonicalFontFamilyReference.cs
- WindowsFormsSynchronizationContext.cs
- DiscoveryClientOutputChannel.cs
- FocusWithinProperty.cs
- CreateUserWizardDesigner.cs
- SoapAttributeAttribute.cs
- LicFileLicenseProvider.cs
- XmlCharacterData.cs
- DateTimeAutomationPeer.cs
- TransactionFilter.cs
- ColumnCollection.cs
- NameObjectCollectionBase.cs
- SynchronizationLockException.cs
- ReadOnlyCollectionBuilder.cs
- ArrangedElement.cs
- SharedPersonalizationStateInfo.cs
- Zone.cs
- NetworkInformationPermission.cs
- AssemblyHash.cs
- ArraySubsetEnumerator.cs
- LayoutSettings.cs
- FixedBufferAttribute.cs
- TaiwanCalendar.cs
- sqlpipe.cs
- DefaultBinder.cs
- EntryWrittenEventArgs.cs
- TextParaClient.cs
- ListViewItemEventArgs.cs
- XmlSerializerFactory.cs
- StorageFunctionMapping.cs
- Point3DAnimationBase.cs
- TreeViewAutomationPeer.cs
- filewebrequest.cs
- ObjectNotFoundException.cs
- SchemaImporterExtension.cs
- StylusButtonCollection.cs
- DirectoryObjectSecurity.cs
- SqlDataReaderSmi.cs
- Win32.cs
- SessionSwitchEventArgs.cs
- ClientUtils.cs
- PolyLineSegment.cs
- Rectangle.cs
- ControlCachePolicy.cs
- SendActivity.cs
- OdbcPermission.cs
- HScrollProperties.cs
- Scripts.cs
- UInt32.cs
- MulticastOption.cs
- FormsIdentity.cs
- X500Name.cs
- TemplateAction.cs
- Message.cs
- KnownIds.cs
- DataRelation.cs
- SqlFactory.cs
- CellConstantDomain.cs
- processwaithandle.cs
- EditCommandColumn.cs
- Path.cs
- HashHelpers.cs
- TypeNameConverter.cs
- CompositeKey.cs
- CompilerResults.cs
- DictionaryEntry.cs
- ProfileGroupSettings.cs
- TableAutomationPeer.cs
- HotCommands.cs
- ValidatorUtils.cs
- Int32Storage.cs
- XPathNavigatorKeyComparer.cs
- DeadCharTextComposition.cs
- OutputCacheSettingsSection.cs
- FileChangesMonitor.cs
- ToolStripContentPanelRenderEventArgs.cs
- DomainConstraint.cs
- CharEntityEncoderFallback.cs
- FrameworkElementFactory.cs
- LineServicesRun.cs
- SystemColors.cs
- ConsoleCancelEventArgs.cs
- TypeUtil.cs
- MasterPageParser.cs
- WriteTimeStream.cs
- ConditionValidator.cs
- ActiveXHelper.cs
- Missing.cs
- XmlWriterDelegator.cs
- TabControlEvent.cs
- DataServiceRequestOfT.cs