In addition to my previous post, where I was calculating age based on birthdates. If we go the other way around and pretend that we have an age span instead; an age 'from' and 'to' we can easily convert those to represent the datespan that we are interested in the following way.

publicclass Agespan

{

publicint AgeFrom { get; set; }

publicint AgeTo { get; set; }

public DateTime DateFrom

{ get

{

{

return DateTime.Now.Date

.AddYears(-AgeTo - 1)

.AddDays(1);

}

}

}

public DateTime DateTo

{

get

{

return DateTime.Now.Date

.AddYears(-AgeFrom)

.AddHours(23)

.AddMinutes(59)

.AddSeconds(59);

}

}

}

Now we can in instantiate our "Agespan" object and use our dates on the object instead.