I try to do the following ...
class Nested
{
Persona[] Empresa;
struct Persona
{
public string nombre;
public string apellido1;
public string apellido2;
public Fecha fechanacimiento;
};
struct Fecha
{
public DateTime fechaNacimiento;
};
public Nested()
{
Empresa = new Persona[100];
}
public int Ocupados()
{
return Empresa.Count(s => s != null);
}
}
I get the following error ...
These are tests that I'm doing, I know that the List < > they are much better to do things of this type but I do not know why it does not allow me to compare array positions, which can contain structures of type Persona
with null