DateTime birthDate = DateTime.Parse(“1970/01/01”);
DateTime today = DateTime.Now;
//誕生日年と今日日付の年から年齢を算出
int iAge = today.Year – birthDate.Year;
//今日日付と比べて誕生日がまだ来ていなければ、-1する
if (today.Month < birthDate.Month || (today.Month == birthDate.Month && today.Day < birthDate.Day)){
iAge--;
}
//デバッグして確認
text1.Text = iAge;