Q:

Update Array and preserve data

i want to update a Global Array that contain 24 data
Decimal[] GolbalInfo = new Decimal[24];

with three different small array containing each one 8 data
Decimal[] TableSwInfo ;

how can i do it please ?

A:

You can use CopyTo. Assuming you have arrays like the following:
//main destination array
Decimal[] GolbalInfo = new Decimal[24];

//smaller source arrays
Decimal[] SmallOne = new Decimal[8];
Decimal[] SmallTwo = new Decimal[8];
Decimal[] SmallThree = new Decimal[8];

You can set the large one using the smaller ones like this:
SmallOne.CopyTo(GolbalInfo, 0);//sets 0 - 7
SmallTwo.CopyTo(GolbalInfo, 7);//sets 8 - 15
SmallThree.CopyTo(GolbalInfo, 15);//sets 16 - 23

I would recommend that you validate the sizes before adding them, although it may be a safe assumption depending on your setup

