for (int i = 0; i < dataGridView2.Rows.Count; ++i) { // sum1 += Convert.ToInt32(dataGridView2.Rows[i].Cells[1].Value); //} //textBox14.Text = ""; String example = dataGridView2.Rows[i].Cells[1].Value.ToString(); Int32 sum1 = example.Split(new char[] { ',' }) // get the "list" of strings .Select(n => Int32.Parse(n)) // get the "list" of integers .Sum(); textBox14.Text = sum1.ToString(); }
[FormName].Close()
var
This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)