QUOTE(Martyr2 @ 29 Jun, 2009 - 11:10 PM)

Just curious but have you tried looking at the
array.copyto method? It can be used to merge arrays together by copying the contents of one array to another.
But if you insist on doing it with the loop, keep in mind that your destination array has to have its size defined and it should be the size of your all your other arrays together.
Plus how is class1 array ever going to be less than class2 array's length when they are the same size?
So in short, look at the length of each array and the size of your destination array and make sure you define the size and that it is big enough to hold all your others, then iterate through each and copy it to the destination.

Well I wish I would of known about the array.copyto method before that would have made my life so much easier countless times. Well thanks for that tidbit of information now I have a new problem. As my example was just that, an example, i'll fill you in on my actual program. I'm using
an object array(thanks to your method) and within it lies a crap load of structures. Within those structures I have specific 'ints' that I wan't to pull out. What i've done is created an int array then a for loop to neatly take and place all the ints and place then within the int array. Here is an example:
CODE
total = new object[First.length + second.length];
point = new int[total.length]
for(int i = 0; i < point.length; i++)
{
//Myprogram is the name of my project and this is a structure cast thing
//so that i can pull the numerous amounts of data from the structure
//that where created in form1
point[i] = ((Myprogram.Form1.Unit)total[i]).unitCost;
}
With this loop I pull all the unitCosts from all the structures i have within the object array. Now the problem is I keep getting the error, 'Object reference not set to an instance of an object.' I can't seem to figure out why this problem is occurring. Much thanks for your expertise.