开发者

calulate according to the DOB given

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.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜