C# cannot convert Int to Double
<p>I get the error converting <code>Int</code> to <code>Double</code>, my next line <code>Average[y] = Average[y] + Students[i].Marks;</code> is not working either. So how can convert <code>int[]</code> to <code>double[]</code>?</p>

<pre><code>public static double[] Averages(StudentMarks[] Students, int amount, string[] DifferentGroups, int GroupAmount, out double[] Average)
    {
        Average = new double[Max];
        int y = 0;
        int CountGroups = 0;
        //int sum = 0;
        for (int i = 0; i &lt; amount; i++)
        {
            if (Students[i].Group == DifferentGroups[y])
            {
                Convert.ToDouble(Students[i].Marks);
                //Average[y] = Average[y] + Students[i].Marks;
            }
        }
        return Average;
    }
</code></pre>

<p>The main:</p>

<pre><code> static void Main(string[] args)
    {
        int amount;
        StudentMarks[] Students;
        string[] DifferentGroups;
        int GroupAmount;
        double[] Average;
        ReadData(out Students, out amount);
        DifferentGroups = FindDifferentGroups(Students, amount, out DifferentGroups, out GroupAmount);
        Average = Averages(Students, amount, DifferentGroups, GroupAmount, out Average);
</code></pre>

<p>Class:</p>

<pre><code>        public const int Max = 50;
    public string Surname { get; set; }
    public string Name { get; set; }
    public string Group { get; set; }
    public int AmountOfMarks { get; set; }
    public int[] Marks { get; set; }
</code></pre>

<p>So Student[i].Marks is Array.</p>