با سلام با کد ذیل اعداد در یک ستوون دیتاگرید را ماکزیمم را به من نشان میدهد ولی اگر اعداد منفی باشد صفر نمایش میدهد.لطفا راهنمایی فرمایید.
double max = 0;
( if (dataGridView4.Rows.Count > 0
{
for (int i = 0; i <= 10; i++)
{

if (max < Convert.ToDouble(dataGridView4.Rows[i].Cells[15].Value))
{
max = (Convert.ToDouble(dataGridView4.Rows[i].Cells[15].Value));
}
}
; ( textBox13.Text = max.ToString("N6");
}