📅  最后修改于: 2022-03-11 14:49:04.594000             🧑  作者: Mango
var count = this.dataGridViewArticles.Rows.Cast().Count();
var countjustX = this.dataGridView1.Rows.Cast()
.Count(row => row.Cells["RisFin"].Value == "X");
this.textBox1.Text = count.ToString();