Code:
/ DotNET / DotNET / 8.0 / untmp / whidbey / REDBITS / ndp / fx / src / Designer / CompMod / System / ComponentModel / Design / ArrayEditor.cs / 1 / ArrayEditor.cs
//------------------------------------------------------------------------------ //// Copyright (c) Microsoft Corporation. All rights reserved. // //----------------------------------------------------------------------------- /* */ namespace System.ComponentModel.Design { using System.Runtime.Serialization.Formatters; using System.Runtime.Remoting.Activation; using System.Runtime.InteropServices; using System.ComponentModel; using System.Diagnostics; using System; using System.Collections; using Microsoft.Win32; using System.Drawing; using System.Drawing.Design; using System.Reflection; using System.Windows.Forms; using System.Windows.Forms.Design; using System.Windows.Forms.ComponentModel; ////// /// public class ArrayEditor : CollectionEditor { ///Edits an array of values. ////// /// public ArrayEditor(Type type) : base(type) { } ////// Initializes a new instance of ///using the /// specified type for the array. /// /// /// protected override Type CreateCollectionItemType() { return CollectionType.GetElementType(); } ////// Gets or /// sets /// the data type this collection contains. /// ////// /// protected override object[] GetItems(object editValue) { if (editValue is Array) { Array valueArray = (Array)editValue; object[] items = new object[valueArray.GetLength(0)]; Array.Copy(valueArray, items, items.Length); return items; } else { return new object[0]; } } ////// Gets the items in the array. /// ////// /// protected override object SetItems(object editValue, object[] value) { if (editValue is Array || editValue == null) { Array newArray = Array.CreateInstance(CollectionItemType, value.Length); Array.Copy(value, newArray, value.Length); return newArray; } return editValue; } } } // File provided for Reference Use Only by Microsoft Corporation (c) 2007. // Copyright (c) Microsoft Corporation. All rights reserved./// Sets the items in the array. /// ///
Link Menu
This book is available now!
Buy at Amazon US or
Buy at Amazon UK
- Scene3D.cs
- TextBoxBase.cs
- PropertyPathConverter.cs
- DebugInfoExpression.cs
- ConfigurationSectionCollection.cs
- FlowDocumentView.cs
- SamlAssertionDirectKeyIdentifierClause.cs
- SystemIPv4InterfaceProperties.cs
- WinFormsUtils.cs
- JsonDeserializer.cs
- PolicyLevel.cs
- TripleDES.cs
- OleDbRowUpdatedEvent.cs
- XsdBuilder.cs
- PixelFormatConverter.cs
- EmbeddedMailObjectsCollection.cs
- MessagePropertyDescriptionCollection.cs
- ContainerSelectorGlyph.cs
- XmlSerializationReader.cs
- MenuTracker.cs
- ScrollViewerAutomationPeer.cs
- SettingsPropertyNotFoundException.cs
- FileDataSource.cs
- Range.cs
- HttpCapabilitiesBase.cs
- OleDbSchemaGuid.cs
- UriParserTemplates.cs
- ChangeNode.cs
- As.cs
- AdornerLayer.cs
- Constraint.cs
- HealthMonitoringSectionHelper.cs
- PropertyMappingExceptionEventArgs.cs
- BackStopAuthenticationModule.cs
- UriSection.cs
- XmlAnyElementAttribute.cs
- ColorConverter.cs
- HostingEnvironmentSection.cs
- EventsTab.cs
- ConnectionsZoneDesigner.cs
- XmlSchemaValidationException.cs
- FileDetails.cs
- Help.cs
- RegexCompilationInfo.cs
- X509RawDataKeyIdentifierClause.cs
- WebPartDisplayMode.cs
- NameValueConfigurationElement.cs
- ServerProtocol.cs
- InProcStateClientManager.cs
- LineInfo.cs
- AtlasWeb.Designer.cs
- WebSysDescriptionAttribute.cs
- ProxyWebPartManagerDesigner.cs
- ProtocolsConfigurationEntry.cs
- BoundField.cs
- ResourceDisplayNameAttribute.cs
- Control.cs
- Double.cs
- WindowsListViewGroupSubsetLink.cs
- D3DImage.cs
- IChannel.cs
- LoadGrammarCompletedEventArgs.cs
- DateTimeFormat.cs
- EntityDataSourceChangingEventArgs.cs
- DataGridViewAccessibleObject.cs
- PointAnimationUsingKeyFrames.cs
- ProxyFragment.cs
- OpenTypeCommon.cs
- TaskFactory.cs
- TextWriterEngine.cs
- RequestCachePolicy.cs
- ServiceManager.cs
- MembershipSection.cs
- SatelliteContractVersionAttribute.cs
- SecurityDocument.cs
- Pen.cs
- webproxy.cs
- WorkflowOperationBehavior.cs
- SmiEventSink_Default.cs
- VirtualDirectoryMappingCollection.cs
- HttpConfigurationContext.cs
- MainMenu.cs
- ETagAttribute.cs
- RenderTargetBitmap.cs
- DataObjectPastingEventArgs.cs
- ObjectSet.cs
- InternalConfigConfigurationFactory.cs
- Pens.cs
- MenuItemStyle.cs
- Vector3DAnimationUsingKeyFrames.cs
- XmlSchemaDocumentation.cs
- XmlTextReaderImplHelpers.cs
- Debugger.cs
- EventLogPropertySelector.cs
- DirectionalLight.cs
- Activator.cs
- CodeTypeReference.cs
- CmsInterop.cs
- DocumentGrid.cs
- NativeRecognizer.cs