I made student list containing roll no.,name, gender, DOB,Age ,marks1,marks2,marks3,total and avg. i want to right a code fo开发者_如何转开发r age that is when i click on age it should display the correct age according to the DOB given. can you help using textbox events in c#
The algorithm should be
ageInYears = currentYear - birthYear - (birthMonth <= currentMonth && birthDay <= currentDay ? 0 : 1);
Subtract the years, and subtract an additional year if they haven't had their birthday yet this year.
精彩评论