I have a class defined as below.
public class Risk
{
public DateTime RiskDate { get; set;}
public string RiskStatus { get; set;}
}
And I have a List of Risk as below
RiskDate RiskStatus
10/10/2001 High
15/10/2001 Low
21/10/2001 High
28/10/2001 Low
05/11/2001 High
08/11/2001 Low
I would like to find the date range from the list for a given date. For example, if my input date is 17/10/2001 then I would like to pull 15/10/2001 and 21/10/2001 from the list. If my input date is an exact match to the list, for example 28/10/2001, then I would like to pull only that date from the list.
I hope someone can advice me on this.
Thanks
This works: