Class DateTimeCollection
Inheritance
Inherited Members
Namespace: Telerik.WinControls.UI
Assembly: Telerik.WinControls.UI.dll
Syntax
public class DateTimeCollection : IEnumerable<DateTime>, IList, ICollection, IEnumerable, ICloneable
Constructors
DateTimeCollection()
Declaration
public DateTimeCollection()
DateTimeCollection(RadCalendar)
Properties
Count
Gets the total number of DateTime objects in the collection.
Declaration
public virtual int Count { get; }
Property Value
System.Int32
|
Implements
Item[Int32]
Gets or sets the DateTime at the specified indexed location in the collection.
Declaration
public virtual DateTime this[int index] { get; set; }
Parameters
System.Int32
index
The indexed location of the DateTime in the collection. |
Property Value
System.DateTime
The DateTime at the specified indexed location in the collection. |
Methods
Add(DateTime)
Adds a previously created DateTime object to the end of the DateTimeCollection.
Declaration
public virtual DateTime Add(DateTime date)
Parameters
System.DateTime
date
The DateTime object to add to the collection. |
Returns
System.DateTime
The zero-based index value of the DateTime object added to the DateTimeCollection. |
AddRange(DateTime[])
Adds an array of previously created DateTime objects to the collection.
Declaration
public virtual void AddRange(DateTime[] inputItems)
Parameters
System.DateTime[]
inputItems
An array of DateTime objects representing the dates to add to the collection. |
BeginUpdate()
Declaration
public void BeginUpdate()
CanAdd(DateTime)
CanAdd method verify whether the date can be add to the collection.
Declaration
public virtual bool CanAdd(DateTime date)
Parameters
System.DateTime
date
The DateTime object to insert into the collection. |
Returns
System.Boolean
|
Clear()
Removes all DateTime objects from the collection.
Declaration
public void Clear()
Clone()
Creates a new DateTimeCollection object that is a copy of the current instance.
Declaration
public virtual DateTimeCollection Clone()
Returns
DateTimeCollection
A new DateTimeCollection object that is a copy of this instance. |
Contains(DateTime)
Determines whether the specified DateTime object is a member of the collection.
Declaration
public virtual bool Contains(DateTime value)
Parameters
System.DateTime
value
The DateTime to locate in the collection. |
Returns
System.Boolean
true if the DateTime is a member of the collection; otherwise, false. |
EndUpdate()
Declaration
public void EndUpdate()
GetEnumerator()
Returns an enumerator that can be used to iterate through the DateTime collection.
Declaration
public virtual IEnumerator<DateTime> GetEnumerator()
Returns
System.Collections.Generic.IEnumerator<System.DateTime>
An IEnumerator that represents the DateTime collection. |
Implements
IndexOf(DateTime)
Returns the index of the specified DateTime object in the collection.
Declaration
public virtual int IndexOf(DateTime date)
Parameters
System.DateTime
date
The DateTime object to locate in the collection. |
Returns
System.Int32
The zero-based index of the item found in the DateTimeCollection; otherwise, -1. |
Insert(Int32, DateTime)
Inserts an existing DateTime object into the DateTimeCollection at the specified location.
Declaration
public virtual void Insert(int index, DateTime date)
Parameters
System.Int32
index
The indexed location within the collection to insert the DateTime object. |
System.DateTime
date
The DateTime object to insert into the collection. |
Remove(DateTime)
Removes the specified DateTime object from the DateTimeCollection.
Declaration
public virtual void Remove(DateTime date)
Parameters
System.DateTime
date
The DateTime object to remove. |
RemoveRange(DateTime[])
Declaration
public virtual void RemoveRange(DateTime[] dates)
Parameters
System.DateTime[]
dates
|
RemoveRange(Int32, Int32)
Removes a range of DateTime elements from the DateTimeCollection.
Declaration
public virtual void RemoveRange(int index, int count)
Parameters
System.Int32
index
The zero-based starting index of the range of elements to remove. |
System.Int32
count
The number of elements to remove. |
ToArray()
Copies the elements of the DateTime collection to a new DateTime array.
Declaration
public virtual DateTime[] ToArray()
Returns
System.DateTime[]
A DateTime array |
UpdateOwnerVisuals()
Declaration
protected void UpdateOwnerVisuals()
Explicit Interface Implementations
ICollection.CopyTo(Array, Int32)
Copies the elements of the DateTimeCollection to an Array, starting at a particular Array index.
Declaration
void ICollection.CopyTo(Array array, int index)
Parameters
System.Array
array
The one-dimensional Array that is the destination of the elements copied from DateTimeCollection. The Array must have zero-based indexing. |
System.Int32
index
The zero-based index in array at which copying begins. |
Implements
ICollection.IsSynchronized
Gets a value indicating whether access to the DateTimeCollection is synchronized (thread safe).
Declaration
bool ICollection.IsSynchronized { get; }
Returns
System.Boolean
|
Implements
ICollection.SyncRoot
Gets an object that can be used to synchronize access to the DateTimeCollection.
Declaration
object ICollection.SyncRoot { get; }
Returns
System.Object
|
Implements
IEnumerable.GetEnumerator()
Returns an enumerator that can be used to iterate through the DateTime collection.
Declaration
IEnumerator IEnumerable.GetEnumerator()
Returns
System.Collections.IEnumerator
An IEnumerator that represents the DateTime collection. |
Implements
IList.Add(Object)
Adds a previously created DateTime object to the end of the DateTimeCollection.
Declaration
int IList.Add(object value)
Parameters
System.Object
value
The DateTime object to add to the collection. |
Returns
System.Int32
The zero-based index value of the DateTime object added to the DateTimeCollection. |
Implements
IList.Clear()
Removes all DateTime objects from the collection.
Declaration
void IList.Clear()
Implements
IList.Contains(Object)
Determines whether the specified DateTime object is a member of the collection.
Declaration
bool IList.Contains(object value)
Parameters
System.Object
value
The DateTime to locate in the collection. |
Returns
System.Boolean
true if the DateTime is a member of the collection; otherwise, false. |
Implements
IList.get_Item(Int32)
Declaration
object IList.get_Item(int index)
Parameters
System.Int32
index
|
Returns
System.Object
|
Implements
IList.IndexOf(Object)
Returns the index of the specified DateTime object in the collection.
Declaration
int IList.IndexOf(object value)
Parameters
System.Object
value
The DateTime object to locate in the collection. |
Returns
System.Int32
The zero-based index of the item found in the DateTimeCollection |
Implements
IList.Insert(Int32, Object)
Inserts an existing DateTime object into the DateTimeCollection at the specified location.
Declaration
void IList.Insert(int index, object value)
Parameters
System.Int32
index
The indexed location within the collection to insert the DateTime object. |
System.Object
value
The DateTime object to insert into the collection. |
Implements
IList.IsFixedSize
Gets a value indicating whether the DateTimeCollection has a fixed size.
Declaration
bool IList.IsFixedSize { get; }
Returns
System.Boolean
|
Implements
IList.IsReadOnly
Gets a value indicating whether the DateTimeCollection is read-only.
Declaration
bool IList.IsReadOnly { get; }
Returns
System.Boolean
|
Implements
IList.Item[Int32]
Gets or sets the DateTime at the specified indexed location in the collection.
Declaration
object IList.this[] { get; set; }
Parameters
System.Int32
index
The indexed location of the DateTime in the collection. |
Returns
System.Object
The DateTime at the specified indexed location in the collection. |
Implements
IList.Remove(Object)
Removes the specified DateTime object from the DateTimeCollection.
Declaration
void IList.Remove(object value)
Parameters
System.Object
value
The DateTime object to remove. |
Implements
IList.RemoveAt(Int32)
Removes the element at the specified index of the DateTimeCollection.
Declaration
void IList.RemoveAt(int index)
Parameters
System.Int32
index
The zero-based index of the element to remove. |
Implements
IList.set_Item(Int32, Object)
Declaration
void IList.set_Item(int index, object value)
Parameters
System.Int32
index
|
System.Object
value
|
Implements
ICloneable.Clone()
Creates a new object that is a copy of the current instance.
Declaration
object ICloneable.Clone()
Returns
System.Object
A new object that is a copy of this instance. |