"Magnus" <ma*************@mikla.nu> schrieb
Is there any simple onerowcode to convert a collection to an array?
For example I have two separate tabcontrols with several tabpages.
I want to use Tabcontrol1 but add all tabpages from Tabcontrol2 to this.
I tried with TabControl1.TabPages.AddRange(Tabcontrol2.TabPages ) but this
don't work.
=======
The type of System.Windows.Forms.TabControl.TabPages is
System.Windows.Forms.TabControl.TabPageCollection. It implements the
System.Collections.ICollection interface. The interace has a CopyTo method
you can use to copy the tabpages to an array to be passed to AddRange.
--
Armin
http://www.plig.net/nnq/nquote.html http://www.netmeister.org/news/learn2quote.html