Code:
/ FX-1434 / FX-1434 / 1.0 / untmp / whidbey / REDBITS / ndp / fx / src / WinForms / Managed / System / WinForms / PropertyGridInternal / GridEntryCollection.cs / 1 / GridEntryCollection.cs
//------------------------------------------------------------------------------ //// Copyright (c) Microsoft Corporation. All rights reserved. // //----------------------------------------------------------------------------- /* */ namespace System.Windows.Forms.PropertyGridInternal { using System.Runtime.InteropServices; using System.Diagnostics; using System; using System.Collections; using System.Reflection; using System.Drawing.Design; using System.ComponentModel; using System.ComponentModel.Design; using System.Windows.Forms; using System.Windows.Forms.Design; using System.Drawing; using Microsoft.Win32; internal class GridEntryCollection : GridItemCollection { private GridEntry owner; public GridEntryCollection(GridEntry owner, GridEntry[] entries) : base(entries) { this.owner = owner; } public void AddRange(GridEntry[] value) { if (value == null) { throw new ArgumentNullException("value"); } if (entries != null) { GridEntry[] newArray = new GridEntry[entries.Length + value.Length]; entries.CopyTo(newArray, 0); value.CopyTo(newArray, entries.Length); entries = newArray; } else { entries = (GridEntry[])value.Clone(); } } public void Clear() { entries = new GridEntry[0]; } public void CopyTo(Array dest, int index) { entries.CopyTo(dest, index); } internal GridEntry GetEntry(int index) { return (GridEntry)entries[index]; } internal int GetEntry(GridEntry child) { return Array.IndexOf(entries, child); } public void Dispose() { Dispose(true); GC.SuppressFinalize(this); } protected virtual void Dispose(bool disposing) { if (disposing) { if (owner != null && entries != null) { for (int i = 0; i < entries.Length; i++) { if (entries[i] != null) { ((GridEntry)entries[i]).Dispose(); entries[i] = null; } } entries = new GridEntry[0]; } } } ~GridEntryCollection() { Dispose(false); } } } // File provided for Reference Use Only by Microsoft Corporation (c) 2007. // Copyright (c) Microsoft Corporation. All rights reserved.
Link Menu

This book is available now!
Buy at Amazon US or
Buy at Amazon UK
- DataRowExtensions.cs
- Constraint.cs
- listitem.cs
- DataGridViewBand.cs
- Binding.cs
- EntityContainerAssociationSetEnd.cs
- MobileListItem.cs
- TreeView.cs
- HttpCacheParams.cs
- ThreadPool.cs
- FlowDocumentReader.cs
- BitSet.cs
- TerminatorSinks.cs
- Base64Encoder.cs
- CustomValidator.cs
- returneventsaver.cs
- VideoDrawing.cs
- TextEditorParagraphs.cs
- DataMemberConverter.cs
- LogicalTreeHelper.cs
- BindingWorker.cs
- ColorAnimationUsingKeyFrames.cs
- ViewStateException.cs
- ScriptingWebServicesSectionGroup.cs
- DataGridViewRowStateChangedEventArgs.cs
- ToolStripTextBox.cs
- SourceItem.cs
- UriParserTemplates.cs
- SoapSchemaExporter.cs
- Literal.cs
- PrtCap_Base.cs
- LinqDataSourceUpdateEventArgs.cs
- DbMetaDataFactory.cs
- Help.cs
- TabletDeviceInfo.cs
- Transform.cs
- Rules.cs
- SqlClientWrapperSmiStream.cs
- SqlInternalConnectionSmi.cs
- SchemaHelper.cs
- PolygonHotSpot.cs
- X509Certificate.cs
- SubstitutionList.cs
- WorkflowTraceTransfer.cs
- OutOfProcStateClientManager.cs
- PropertyRecord.cs
- UpdateTracker.cs
- TransformedBitmap.cs
- SymbolType.cs
- XmlDocumentSurrogate.cs
- InstanceDataCollectionCollection.cs
- Set.cs
- NamespaceDisplay.xaml.cs
- ReadContentAsBinaryHelper.cs
- CommandHelper.cs
- StylusShape.cs
- ObjectDataSourceFilteringEventArgs.cs
- InfiniteTimeSpanConverter.cs
- ContentTextAutomationPeer.cs
- TextEditor.cs
- WebRequest.cs
- GridViewEditEventArgs.cs
- WindowsRebar.cs
- PenContexts.cs
- DoubleConverter.cs
- IsolationInterop.cs
- Point4DConverter.cs
- DefaultExpressionVisitor.cs
- PathFigure.cs
- EdmProviderManifest.cs
- FontResourceCache.cs
- RegionIterator.cs
- ServiceXNameTypeConverter.cs
- BridgeDataRecord.cs
- FrugalMap.cs
- Semaphore.cs
- AssemblyBuilder.cs
- Control.cs
- SafeLibraryHandle.cs
- ObjectNotFoundException.cs
- SqlErrorCollection.cs
- Scripts.cs
- FileNotFoundException.cs
- IdnMapping.cs
- PropertyValueChangedEvent.cs
- EncodingDataItem.cs
- FocusWithinProperty.cs
- XPathQilFactory.cs
- SimpleRecyclingCache.cs
- TemplatedAdorner.cs
- StandardToolWindows.cs
- AppDomainProtocolHandler.cs
- HuffmanTree.cs
- WebServiceMethodData.cs
- CommandLineParser.cs
- columnmapkeybuilder.cs
- XamlTypeMapper.cs
- datacache.cs
- CFStream.cs
- PersonalizationStateQuery.cs