Code:
/ FXUpdate3074 / FXUpdate3074 / 1.1 / DEVDIV / depot / DevDiv / releases / whidbey / QFE / ndp / fx / src / xsp / System / Web / UI / WebControls / DataKeyCollection.cs / 1 / DataKeyCollection.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 DataKeyCollection : ICollection { private ArrayList keys; ////// public DataKeyCollection(ArrayList keys) { this.keys = keys; } ///Initializes a new instance of the ///class. /// public int Count { get { return keys.Count; } } ///Gets the number of objects in the collection. This property is read-only. ////// public bool IsReadOnly { get { return false; } } ///Gets the value that specifies whether items in the ///can be /// modified. This property is read-only. /// public bool IsSynchronized { get { return false; } } ///Gets a value that indicates whether the ///is /// thread-safe. This property is read-only. /// public object SyncRoot { get { return this; } } ///Gets the object used to synchronize access to the collection. This property is read-only. ////// public object this[int index] { get { return keys[index]; } } ///Gets a ///at the specified index in the collection. This property is read-only. /// 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 keys.GetEnumerator(); } } } // File provided for Reference Use Only by Microsoft Corporation (c) 2007. // Copyright (c) Microsoft Corporation. All rights reserved. //------------------------------------------------------------------------------ //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 DataKeyCollection : ICollection { private ArrayList keys; ////// public DataKeyCollection(ArrayList keys) { this.keys = keys; } ///Initializes a new instance of the ///class. /// public int Count { get { return keys.Count; } } ///Gets the number of objects in the collection. This property is read-only. ////// public bool IsReadOnly { get { return false; } } ///Gets the value that specifies whether items in the ///can be /// modified. This property is read-only. /// public bool IsSynchronized { get { return false; } } ///Gets a value that indicates whether the ///is /// thread-safe. This property is read-only. /// public object SyncRoot { get { return this; } } ///Gets the object used to synchronize access to the collection. This property is read-only. ////// public object this[int index] { get { return keys[index]; } } ///Gets a ///at the specified index in the collection. This property is read-only. /// 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 keys.GetEnumerator(); } } } // File provided for Reference Use Only by Microsoft Corporation (c) 2007. // Copyright (c) Microsoft Corporation. All rights reserved.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
- AuthenticationModulesSection.cs
- TextReader.cs
- EditorZone.cs
- DataRowChangeEvent.cs
- EventWaitHandleSecurity.cs
- HtmlFormWrapper.cs
- ToolTipAutomationPeer.cs
- DeflateEmulationStream.cs
- Errors.cs
- WorkflowOwnershipException.cs
- ChtmlTextWriter.cs
- XmlWellformedWriter.cs
- DataListItemEventArgs.cs
- PreservationFileWriter.cs
- ExceptionHandlersDesigner.cs
- CompiledXpathExpr.cs
- CustomError.cs
- XmlArrayAttribute.cs
- SqlInternalConnection.cs
- ReadWriteSpinLock.cs
- JsonDeserializer.cs
- BuiltInPermissionSets.cs
- smtppermission.cs
- ThemeInfoAttribute.cs
- EarlyBoundInfo.cs
- WithParamAction.cs
- CompositeControl.cs
- CodePageUtils.cs
- COM2Enum.cs
- ChannelCacheDefaults.cs
- ClientSponsor.cs
- DirtyTextRange.cs
- GraphicsState.cs
- SupportsEventValidationAttribute.cs
- VariantWrapper.cs
- EntityDataSourceReferenceGroup.cs
- MethodCallTranslator.cs
- CryptoKeySecurity.cs
- DoubleAnimationUsingPath.cs
- DoubleAnimationClockResource.cs
- ToolStripGripRenderEventArgs.cs
- DynamicMethod.cs
- SingleAnimation.cs
- LogLogRecordHeader.cs
- ConfigXmlReader.cs
- CodeLinePragma.cs
- FilterQuery.cs
- HtmlButton.cs
- CompositeCollectionView.cs
- TypeEnumerableViewSchema.cs
- GlyphRunDrawing.cs
- PersonalizationEntry.cs
- KeyValueConfigurationElement.cs
- XmlSchemaCollection.cs
- BinaryWriter.cs
- TextAdaptor.cs
- HttpRequestBase.cs
- SqlXmlStorage.cs
- IconBitmapDecoder.cs
- DataColumn.cs
- TypeListConverter.cs
- BaseParagraph.cs
- GridLengthConverter.cs
- Triangle.cs
- IndexingContentUnit.cs
- ProcessInfo.cs
- brushes.cs
- ViewDesigner.cs
- WindowsTooltip.cs
- SafeRightsManagementPubHandle.cs
- IdentityNotMappedException.cs
- SHA1Managed.cs
- IdentifierService.cs
- FloaterParagraph.cs
- XmlArrayItemAttributes.cs
- Blend.cs
- XLinq.cs
- CollectionEditorDialog.cs
- SmtpAuthenticationManager.cs
- Brush.cs
- SecurityTokenTypes.cs
- OpenFileDialog.cs
- QuaternionRotation3D.cs
- HtmlElement.cs
- CursorConverter.cs
- HierarchicalDataBoundControlAdapter.cs
- DigitShape.cs
- basemetadatamappingvisitor.cs
- RuntimeConfigLKG.cs
- HMACSHA384.cs
- BaseParser.cs
- XhtmlBasicCommandAdapter.cs
- CompositeCollection.cs
- AddingNewEventArgs.cs
- TimeSpanValidatorAttribute.cs
- EventBuilder.cs
- GlyphElement.cs
- JsonReaderWriterFactory.cs
- FontCacheLogic.cs
- NumberFunctions.cs