Add DataGridView Column Value in C#.net

Today, we will discuss about Add DataGridView Column Value in C#.net
private double  ADDCoulmnValue(int ColIdx, DataGridView dgv)
        {
            double d = 0;
            for (int idx = 0;idx <dgv.Rows.Count;idx++)
            {
                tot += Convert.ToDouble(dgv.Rows[idx].Cells[ColIdx].Value);
            }
            return tot;
        }