EditorPartCollection::CopyTo Method (array<EditorPart^>^, Int32)
Copies the collection to an array of EditorPart controls.
Assembly: System.Web (in System.Web.dll)
The code in the Button1_Click event creates an array of EditorPart controls, adds the LayoutEditorPart1 control to the array, and then uses the method to copy the controls from the EditorPartCollection object to the array.
When you load the page in a browser, you can switch the page into edit mode by selecting Edit in the Display Mode drop-down list control. You can click the verbs menu (the downward arrow) in the title bar of the TextDisplayWebPart control, and click Edit to edit the control. When the editing user interface (UI) is visible, you can see all the EditorPart controls. If you click the Create EditorPartCollection button, you will notice that the titles of all the controls in the custom array are listed near the bottom of the page.
Available since 2.0