Ideally, you should return nullable int to handle null date of birth.
Return null if birthDay is null because in that case, you can't calculate the age.
public static int? GetPersonAge(DateTime? birthDay, DateTime endDate)
{
if(birthDay.HasValue)
{
int years = endDate.Year - birthDay.Value.Year;
if (birthDay.Value.Month > endDate.Month || (birthDay.Value.Month == endDate.Month && birthDay.Value.Day > endDate.Day))
years--;
return years;
}
return null;
}