How do I smartly initialize an Array with two (or more) other arrays in C#?
double[] d1 = new double[5];
double[] d2 = new double[3];
double[] dTotal = new double[8]; // I need this to be {d1 then d2}
Another question: How do I concatenate C# arrays efficiently?
You could use CopyTo:
double[] d1 = new double[5];
double[] d2 = new double[3];
double[] dTotal = new double[d1.Length + d2.Length];
d1.CopyTo(dTotal, 0);
d2.CopyTo(dTotal, d1.Length);