Despite the existance of all that fancy lambda stuff, I would still write this the old-school way:
var studentList = new List<student>();
foreach (var st in studentList) {
if (st.Age == 0) st.AgeInMonths = DateTime.Now.Subtract(st.DOB).TotalDays / 30);
}
My "solution" needs ~160 characters versus ~174 characters in the op version (without the generic method). I also think it's easier to read for the majority of people - and that's the important point.
This member has not yet provided a Biography. Assume it's interesting and varied, and probably something to do with programming.