Class
DateTimeCollection

Definition

Namespace:Telerik.WinControls.UI

Assembly:Telerik.WinControls.UI.dll

Syntax:

cs-api-definition
public class DateTimeCollection : IList, ICollection, IEnumerable, ICloneable

Inheritance: objectDateTimeCollection

Implements: ICloneableICollectionIEnumerableIList

Constructors

DateTimeCollection()

Declaration

cs-api-definition
public DateTimeCollection()

DateTimeCollection(RadCalendar)

Declaration

cs-api-definition
public DateTimeCollection(RadCalendar calendar)

Parameters

calendar

RadCalendar

Properties

Count

Gets the total number of DateTime objects in the collection.

Declaration

cs-api-definition
public virtual int Count { get; }

Property Value

int

Implements ICollection.Count

this[int]

Gets or sets the DateTime at the specified indexed location in the collection.

Declaration

cs-api-definition
public virtual DateTime this[int index] { get; set; }

Parameters

index

int

The indexed location of the DateTime in the collection.

Property Value

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

cs-api-definition
public virtual DateTime Add(DateTime date)

Parameters

date

DateTime

The DateTime object to add to the collection.

Returns

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

cs-api-definition
public virtual void AddRange(DateTime[] inputItems)

Parameters

inputItems

DateTime[]

An array of DateTime objects representing the dates to add to the collection.

BeginUpdate()

Declaration

cs-api-definition
public void BeginUpdate()

CanAdd(DateTime)

CanAdd method verify whether the date can be add to the collection.

Declaration

cs-api-definition
public virtual bool CanAdd(DateTime date)

Parameters

date

DateTime

The DateTime object to insert into the collection.

Returns

bool

Clear()

Removes all DateTime objects from the collection.

Declaration

cs-api-definition
public void Clear()

Clone()

Creates a new DateTimeCollection object that is a copy of the current instance.

Declaration

cs-api-definition
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

cs-api-definition
public virtual bool Contains(DateTime value)

Parameters

value

DateTime

The DateTime to locate in the collection.

Returns

bool

true if the DateTime is a member of the collection; otherwise, false.

EndUpdate()

Declaration

cs-api-definition
public void EndUpdate()

GetEnumerator()

Returns an enumerator that can be used to iterate through the DateTime collection.

Declaration

cs-api-definition
public virtual IEnumerator<DateTime> GetEnumerator()

Returns

IEnumerator<DateTime>

An IEnumerator that represents the DateTime collection.

IndexOf(DateTime)

Returns the index of the specified DateTime object in the collection.

Declaration

cs-api-definition
public virtual int IndexOf(DateTime date)

Parameters

date

DateTime

The DateTime object to locate in the collection.

Returns

int

The zero-based index of the item found in the DateTimeCollection; otherwise, -1.

Insert(int, DateTime)

Inserts an existing DateTime object into the DateTimeCollection at the specified location.

Declaration

cs-api-definition
public virtual void Insert(int index, DateTime date)

Parameters

index

int

The indexed location within the collection to insert the DateTime object.

date

DateTime

The DateTime object to insert into the collection.

Remove(DateTime)

Removes the specified DateTime object from the DateTimeCollection.

Declaration

cs-api-definition
public virtual void Remove(DateTime date)

Parameters

date

DateTime

The DateTime object to remove.

RemoveRange(DateTime[])

Declaration

cs-api-definition
public virtual void RemoveRange(DateTime[] dates)

Parameters

dates

DateTime[]

RemoveRange(int, int)

Removes a range of DateTime elements from the DateTimeCollection.

Declaration

cs-api-definition
public virtual void RemoveRange(int index, int count)

Parameters

index

int

The zero-based starting index of the range of elements to remove.

count

int

The number of elements to remove.

ToArray()

Copies the elements of the DateTime collection to a new DateTime array.

Declaration

cs-api-definition
public virtual DateTime[] ToArray()

Returns

DateTime[]

A DateTime array

UpdateOwnerVisuals()

Declaration

cs-api-definition
protected void UpdateOwnerVisuals()