Hello again:
In the previous message i said that
surelly the problem is luncBindingSource.DataSource can not be converted to List<Lunch> so it´s null
If you use:
List<Lunch> l=lunchBindingSource.DataSource as List<Lunch>;
if (l==null)
{
MessageBox.Show("Error DataSource can not be converted to List.", "Message", MessageBoxButtons.OK, MessageBoxIcon.Information);
return;
}
foreach (Lunch s in l)
you will see that the problem is that DataSource can not be converted to a List<lunch>.
So, you need to write code that converts that.