cannot implicitly convert type double to double
using System; using System.Collections.Generic; using System.Linq; using System.Text; using System.Threading.Tasks; namespace Simple_Spreadsheet { class Median { private double[] columnA = new double[5], median; public Median(double[] columnA) { this.columnA[0] = columnA[0]; this.columnA[1] = columnA[1]; this.columnA[2] = columnA[2]; this.columnA[3] = columnA[3]; this.columnA[4] = columnA[4]; } public void setA1(double[] columnA) { this.columnA[0] = columnA[0]; } public double getA1() { return columnA[0]; } public void setA2(double[] columnA) { this.columnA[1] = columnA[1]; } public double getA2() { return columnA[1]; } public void setA3(double[] columnA) { this.columnA[2] = columnA[2]; } public double getA3() { return columnA[2]; } public void setA4(double[] columnA) { this.columnA[3] = columnA[3]; } public double getA4() { return columnA[3]; } public void setA5(double[] columnA) { this.columnA[4] = columnA[4]; } public double getA5() { return columnA[4]; } public double calcMedian(double[] columnA) { this.columnA[0] = columnA[0]; this.columnA[1] = columnA[1]; this.columnA[2] = columnA[2]; this.columnA[3] = columnA[3]; this.columnA[4] = columnA[4]; Array.Sort(columnA); median = columnA[2] ; return median; } }