I need the solution for this error:
int contar = tablaalumnos.Rows.Cast<DataGridViewRow>().Count(fila => fila.Cells[6].Value >= 70);
It says that the operand '>=' cannot be applied to operands of type object or int.
This line of code should count certain rows in a datagridview
The field
Value
of aDataGridViewCell
is of typeobject
, you can't compare it to an integer without first converting it to an integer.