skip navigation
  • Product Bundles

    DevCraft

    All Telerik .NET tools and Kendo UI JavaScript components in one package. Now enhanced with:

    • AI Coding Assistants
    • Embedded Reporting
    • Document Processing Libraries
    • SSO Account Sign-in

    Web

    Kendo UI UI for Angular UI for Vue UI for jQuery KendoReact UI for Blazor UI for ASP.NET Core UI for ASP.NET MVC UI for ASP.NET AJAX

    Mobile

    UI for .NET MAUI

    Document Management

    Telerik Document Processing

    Desktop

    UI for .NET MAUI UI for WinUI UI for WinForms UI for WPF

    Reporting

    Telerik Reporting Telerik Report Server

    Testing & Mocking

    Test Studio Telerik JustMock

    CMS

    Sitefinity

    AI Productivity Tools

    AI Coding Assistants

    UI/UX Tools

    ThemeBuilder Design System Kit Templates and Building Blocks

    Debugging

    Fiddler Fiddler Everywhere Fiddler Classic Fiddler Everywhere Reporter FiddlerCore

    Free Tools

    KendoReact Free VB.NET to C# Converter Testing Framework
    View all products
  • Overview
  • Demos
    • What's New
    • Roadmap
    • Release History
  • Support and Learning

    • Support and Learning Hub
    • First Steps
    • Docs
    • Demos
    • Virtual Classroom
    • Forums
    • Videos
    • Blogs
    • Accessibility
    • Submit a Ticket

    Productivity and Design Tools

    • Visual Studio Extensions
    • Visual Studio Templates
    • Embedded Reporting
  • Pricing
  • Shopping cart
    • Account Overview
    • Your Licenses
    • Downloads
    • Support Center
    • Forum Profile
    • Payment Methods
    • Edit Profile
    • Log out
  • Login
  • Contact Us
  • Try now

Class DateTimeCollection

Inheritance
System.Object
DateTimeCollection
Inherited Members
System.Object.ToString()
System.Object.Equals(System.Object)
System.Object.Equals(System.Object, System.Object)
System.Object.ReferenceEquals(System.Object, System.Object)
System.Object.GetHashCode()
System.Object.GetType()
System.Object.MemberwiseClone()
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)

Declaration
public DateTimeCollection(RadCalendar calendar)
Parameters
RadCalendar calendar

Properties

Count

Gets the total number of DateTime objects in the collection.

Declaration
public virtual int Count { get; }
Property Value
System.Int32

Implements
System.Collections.ICollection.Count

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
System.Collections.Generic.IEnumerable<T>.GetEnumerator()

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
System.Collections.ICollection.CopyTo(System.Array, System.Int32)

ICollection.IsSynchronized

Gets a value indicating whether access to the DateTimeCollection is synchronized (thread safe).

Declaration
bool ICollection.IsSynchronized { get; }
Returns
System.Boolean

Implements
System.Collections.ICollection.IsSynchronized

ICollection.SyncRoot

Gets an object that can be used to synchronize access to the DateTimeCollection.

Declaration
object ICollection.SyncRoot { get; }
Returns
System.Object

Implements
System.Collections.ICollection.SyncRoot

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
System.Collections.IEnumerable.GetEnumerator()

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
System.Collections.IList.Add(System.Object)

IList.Clear()

Removes all DateTime objects from the collection.

Declaration
void IList.Clear()
Implements
System.Collections.IList.Clear()

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
System.Collections.IList.Contains(System.Object)

IList.get_Item(Int32)

Declaration
object IList.get_Item(int index)
Parameters
System.Int32 index

Returns
System.Object

Implements
System.Collections.IList.get_Item(System.Int32)

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
System.Collections.IList.IndexOf(System.Object)

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
System.Collections.IList.Insert(System.Int32, System.Object)

IList.IsFixedSize

Gets a value indicating whether the DateTimeCollection has a fixed size.

Declaration
bool IList.IsFixedSize { get; }
Returns
System.Boolean

Implements
System.Collections.IList.IsFixedSize

IList.IsReadOnly

Gets a value indicating whether the DateTimeCollection is read-only.

Declaration
bool IList.IsReadOnly { get; }
Returns
System.Boolean

Implements
System.Collections.IList.IsReadOnly

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
System.Collections.IList.Item[System.Int32]

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
System.Collections.IList.Remove(System.Object)

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
System.Collections.IList.RemoveAt(System.Int32)

IList.set_Item(Int32, Object)

Declaration
void IList.set_Item(int index, object value)
Parameters
System.Int32 index

System.Object value

Implements
System.Collections.IList.set_Item(System.Int32, System.Object)

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.

Implements
System.ICloneable.Clone()

Extension Methods

CommonExtensions.ContainsAny<T>(IEnumerable<T>, IEnumerable<T>)
CommonExtensions.ForEach<T>(IEnumerable<T>, Action<T>)
CommonExtensions.Clone<T>(IEnumerable<T>)
SvgExtentions.Traverse<T>(IEnumerable<T>, Func<T, IEnumerable<T>>)
SvgExtentions.Traverse<T>(T, Func<T, IEnumerable<T>>)
SvgExtentions.TraverseDepthFirst<T>(IEnumerable<T>, Func<T, IEnumerable<T>>)
SvgExtentions.TraverseDepthFirst<T>(T, Func<T, IEnumerable<T>>)
Getting Started
  • Install Now
  • Demos
  • Step-by-Step Tutorial
  • Sample Applications
  • SDK Samples
  • Visual Studio Extensions
Support Resources
  • Code Library
  • Knowledge Base
  • Videos
Community
  • Forums
  • Blogs
  • Feedback Portal
  • Document Processing Feedback Portal

Copyright © 2018 Progress Software Corporation and/or its subsidiaries or affiliates.
All Rights Reserved.

Progress, Telerik, and certain product names used herein are trademarks or registered trademarks of Progress Software Corporation and/or one of its subsidiaries or affiliates in the U.S. and/or other countries. See Trademarks for appropriate markings.