MCQs > IT & Programming > C# > Which of the following is the correct way to calculate 'Age' from date of birth? Example : DateTime bday= DateTime((1990, 10, 3));

C# MCQs

Which of the following is the correct way to calculate "Age" from date of birth? Example : DateTime bday= DateTime((1990, 10, 3));

Answer

Correct Answer: DateTime today = DateTime.Today; int age = today.Year - bday.Year;

Explanation:

Note: This Question is unanswered, help us to find answer for this one

C# Skill Assessment

Overall Skill Level-Poor

Your Skill Level: Poor

Retake Quizzes to improve it

More C# MCQ Questions

search

C# Skill Assessment

Overall Skill Level-Poor

Your Skill Level: Poor

Retake Quizzes to improve it