I have the following code: public string selectS() {
int NbrLingneSelect = 0;
for (int i = 0; i < VCL.Rows.Count; i++)
{
if ((bool)VCL.Rows[i].Cells[0].Value == true)
{
NbrLingneSelect++;
}
}
if (NbrLingneSelect == 0)
{
return "Selectionner une Véhicule ";
}
if (NbrLingneSelect > 1)
{
return "Selectionner une seul Véhicule ";
}
return null;
}
it's calls exception System.NullReferenceException : 'La référence d'objet n'est pas définie à une instance d'un objet.'
System.Windows.Forms.DataGridViewCell.Value.get retournée null.