DateTimeCollection
Collection containing dates of type RadDate. Used in Date Selection functionality
Definition
Namespace:Telerik.Web.UI.Calendar.Collections
Assembly:Telerik.Web.UI.dll
Syntax:
public class DateTimeCollection : CollectionBase, IList, ICollection, IEnumerable, IStateManager
Inheritance: objectCollectionBaseDateTimeCollection
Implements:
Inherited Members
Constructors
DateTimeCollection constructor. Used in Date Selection functionality
public DateTimeCollection()
DateTimeCollection constructor. Used in Date Selection functionality
Properties
Gets or sets the parent RadCalendar controls.
Returns a DateTime object depending on the passed index. Only integer and string indexes are valid.
Methods
Adds the elements of the specified collection to the end of the DateTimeCollection.
public virtual void AddRange(RadDate[] inputItems)
The collection whose RadDate elements should be added to the end of the DateTimeCollection.
Removes all DateTime objects in the collection of CalendarDays.
public void Clear()
Clones the DateTimeCollection instance.
Copies all the elements of the current one-dimensional DateTimeCollection to the specified one-dimensional DateTimeCollection starting at the specified destination index. The index is specified as a 32-bit integer.
public virtual void CopyTo(Array array, int index)
The one-dimensional DateTimeCollection that is the destination of the elements copied from the current DateTimeCollection.
indexintA 32-bit integer that represents the index in array at which copying begins.
Copies all DateTime elements of the DateTime Array to the specified one-dimensional DateTimeCollection starting at the specified destination index. The index is specified as a 32-bit integer.
public virtual void CopyTo(DateTime[] inputArray, int startCopyIndex)
The one-dimensional DateTimeCollection that is the destination of the elements copied from the current DateTimeCollection.
startCopyIndexintA 32-bit integer that represents the index in array at which copying begins.
Copies all DateTime elements of the DateTime Array to the specified one-dimensional DateTimeCollection.
public virtual void CopyTo(DateTime[] inputArray)
The one-dimensional DateTimeCollection that is the destination of the elements copied from the current DateTimeCollection.
Returns a zero based index of a DateTime object depending on the passed index.
[SuppressMessage("Microsoft.Performance", "CA1800:DoNotCastUnnecessarily")]
public virtual int IndexOf(object inputItem)
The zero-based index, DateTime object or the date represented by the searched DateTime object.
Returns:A zero based index of the DateTime object in the collection, or -1 if the DateTime object is not found.
Deletes a DateTime object from the collection.
public virtual void Remove(RadDate inputItem)
The DateTime object to remove.
Deletes the DateTime object from the collection at the specified index.
public void RemoveAt(int index)
The index in collection at which the DateTime object will be deleted.
Removes a range of elements from the DateTimeCollection.
Reverses the order of the elements in the entire collection.
public virtual void Reverse()
Please refer to Reverse() for details.
Sorts the elements in the entire DateTimeCollection using the IComparable implementation of each element.
Sorts the elements in the entire DateTimeCollection using the specified IComparer interface.
public virtual void Sort(IComparer itemComparer)
The IComparer implementation to use when comparing elements.
-or-
A null reference to use the IComparable implementation of each element.
Exceptions: NotSupportedExceptionSorts the elements in the specified range using the specified IComparer interface.
public virtual void Sort(int startIndex, int itemCount, IComparer itemComparer)
The zero-based starting index of the range of elements to sort.
itemCountintThe number of elements to sort.
itemComparerIComparerThe IComparer implementation to use when comparing elements.
-or-
A null reference to use the IComparable implementation of each element.
Exceptions: ArgumentExceptionstartIndex and itemCount do not denote a
valid range of elements in the DateTimeCollection.
startIndex is less than zero.
-or-
itemCount is less than zero.