OOPs.. Red herring..Wrong API.
You need to use AddRange.
private void Form1_Paint(object sender, System.Windows.Forms.PaintEventArgs
e)
{
ArrayList a=new ArrayList();
ArrayList b=new ArrayList();
a.Add("One");
a.Add("Two");
a.Add("Three");
a.Add("Four");
a.Add("Five");
b.Add("Six");
b.Add("Seven");
b.Add("Eight");
b.Add("Nine");
b.Add("Ten");
a.AddRange(b);
int y=10;
foreach(string s in a)
{
e.Graphics.DrawString(s,Font,Brushes.Black,10,y);
y+=(int)Font.GetHeight()+4;
}
--
Bob Powell [MVP]
Visual C#, System.Drawing
Find great Windows Forms articles in Windows Forms Tips and Tricks
http://www.bobpowell.net/tipstricks.htm
Answer those GDI+ questions with the GDI+ FAQ
http://www.bobpowell.net/faqmain.htm
All new articles provide code in C# and VB.NET.
Subscribe to the RSS feeds provided and never miss a new article.
"pmclinn" <pe***@mclinn.com> wrote in message
news:11*********************@c13g2000cwb.googlegro ups.com...
I have a function that returns an arraylist.
I want the returned arraylist to be copied into the local arraylist.
What is the most efficient way of doing this?
-Peter