هر چند این mthread درست میگن، ولی طوری که معلومه شما نمی خواین از DateTime استفاده کنید. پس این جواب سوالتونه
private void Form2_Load(object sender, EventArgs e)
{
dataGridView1.Rows.Add("02:15", "sun");
dataGridView1.Rows.Add("05:25", "sut");
dataGridView1.Rows.Add("07:55", "mon");
// now using ints
int totalHours = 0;
int totalMins = 0;
foreach (DataGridViewRow row in dataGridView1.Rows)
{
if (row.IsNewRow) break;
object val = row.Cells[0].Value;
if (!Convert.IsDBNull(val) && val != null && val.ToString().Length > 0)
{
string[] items = val.ToString().Split(':');
totalHours += int.Parse(items[0]);
totalMins += int.Parse(items[1]);
}
}
totalHours += totalMins / 60;
totalMins = totalMins % 60;
label1.Text = String.Format("{0:D2}:{1:D2}", totalHours, totalMins);
}
اینم خروجی