Raje_
Вы можете попробовать этот способ с помощью linq :
DateTime fromDate = DateTime.Parse("2015-12-01");
DateTime toDate = DateTime.Parse("2015-12-31");
var finalValue = from a in yourlist where (a.DOB.Date >= fromDate.Date && a.DOB.Date <= toDate.Date) select a;
[Редактировать]
Одна небольшая демонстрация :
//User Class
public class User
{
public string Name { get; set; }
public DateTime DOB { get; set; }
}
//Create a list with values :
List<User> lst = new List<User>();
lst.Add(new User{ Name = "Value 0", DOB = Convert.ToDateTime("2015-11-05") });
lst.Add(new User{ Name = "Raj 0", DOB = Convert.ToDateTime("2015-12-01") });
lst.Add(new User{ Name = "Raj 1", DOB = Convert.ToDateTime("2015-12-02") });
lst.Add(new User{ Name = "Raj 2", DOB = Convert.ToDateTime("2015-12-03") });
lst.Add(new User{ Name = "Raj 3", DOB = Convert.ToDateTime("2015-12-31") });
//then write filter code :
DateTime fromDate = DateTime.Parse("2015-12-01");
DateTime toDate = DateTime.Parse("2015-12-31");
var finalValue = from a in lst where (a.DOB.Date >= fromDate.Date && a.DOB.Date <= toDate.Date) select a;
//here in finalValue you will see filtered data.
Удачи.