public static Complex Sum(this Complex[] x) { if (x == null) throw new ArgumentNullException("x"); Complex r = Complex.Zero; for (int i = 0; i < x.Length; i++) r += x[i]; return r; }