Mark Hughes

Mark Hughes

  • NA
  • 5
  • 0

Multi - threading C#

Nov 17 2009 1:12 PM

HI,
I'm trying to create an ArrayList of array's created by the code below. Each line in the ArrayList requires the previous line's array to calculate. However for each line the code below is run 6 times creating 6 arrays which are merged together and added to the Master ArrayList.
Running this piece of code 6 times for each line is time consuming. Therefore I would like to run the code on seperate threads and when finished merge the 6 arrays together and add them to the ArrayList.
Could somebody please help me with this?
Thanks,
Mark
        public double[, , , ,] PeriodTree()
        {
            // My code creates a double using Previous Period numbers and returns double[, , , ,] ThisPeriod
            double[, , , ,] ThisPeriod = new double[2, 2, 7, 51, 51];
            mycode...
            return ThisPeriod;
         }

Answers (4)