开发者

calulate according to the DOB given

开发者 https://www.devze.com 2023-01-03 00:15 出处:网络
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

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

精彩评论

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