[]
The DateList class is a wrapper for the List<T> instance. At addition of the new value, it cuts off the time part of the value and ensures that the value is not present in the list yet.
public class DateList
This class uses binary search for all operations.
Name | Description |
---|---|
DateList() | Initializes a new instance of DateList class. |
Name | Description |
---|---|
Count | Returns the number of items in the wrapped list. |
Items | Returns the reference to the wrapped list. |
Name | Description |
---|---|
Add(DateTime) | Adds new date to the list. |
Clear() | Clears all items from the wrapped list. |
Contains(IList<DateTime>) | Returns true if either of specified items exists in the wrapped list. |
Contains(DateTime) | Returns true if specified item exists in the wrapped list. |
Contains(DateTime[]) | Returns true if either of specified items exists in the wrapped list. |
GetNextDate(DateTime) | Returns the first item that is greater than specified one. |
GetPreviousDate(DateTime) | Returns the first item that is less than specified one. |
Remove(DateTime) | Removes specified item from the wrapped list. |
RemoveAt(int) | Removes item at the specified index. |