My function is not checking the IF condition is already going straight into ELSE [closed]

1
    private int dia;
    private int mes;
    private int ano;

    public bool GravaData(int d, int m, int a)
    {
        if ((d > 0 && d <= 31) && (m > 0 && m <= 12) && (ano > 0))
        {
            dia = d;
            mes = m; 
            ano = a;
            return true;
        }
        else
        {
            return false;
        }
    }
    
asked by anonymous 27.04.2018 / 06:26

0 answers