Date Validation c#

Date Validation c#

public static Boolean DateValidation(int day, int month, int year)
        {
            bool Chkdate = false;
            DateTime Cdatetime = DateTime.Now;
            int Cday = Cdatetime.Day;
            int CMonth = Cdatetime.Month;
            int Cyear = Cdatetime.Year;
            if (year < Cyear)
            {
                Chkdate = true;
            }
            else if (year == Cyear)
            {
                if (month < CMonth)
                {
                    Chkdate = true;
                }
                else if (month == CMonth)
                {
                    if (day <= Cday)
                    {
                        Chkdate = true;
                    }
                }
            }
            return Chkdate;
        }

2020-01-31