menu

UWP

  • Code Examples
  • Upgrade Guide
  • User Guide
  • Demos
  • Support
  • Forums
  • Download
Class DateTimeCollection - UWP API Reference | Syncfusion

    Show / Hide Table of Contents

    Class DateTimeCollection

    Represents a collection of the DateTime

    Inheritance
    System.Object
    DateTimeCollection
    Implements
    System.Collections.Generic.ICollection<System.DateTime>
    System.Collections.Generic.IEnumerable<System.DateTime>
    System.Collections.IEnumerable
    System.Collections.Specialized.INotifyCollectionChanged
    Namespace: Syncfusion.UI.Xaml.Controls.Input
    Assembly: Syncfusion.SfInput.UWP.dll
    Syntax
    public class DateTimeCollection : Object, ICollection<DateTime>, IEnumerable<DateTime>, IEnumerable, INotifyCollectionChanged

    Constructors

    DateTimeCollection()

    Initializes a new instance of the DateTimeCollection class.

    Declaration
    public DateTimeCollection()

    Properties

    Count

    Gets the counts of the selected dates

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

    IsReadOnly

    Gets a value indicating whether it is true.

    Declaration
    public bool IsReadOnly { get; }
    Property Value
    Type
    System.Boolean

    Item[Int32]

    Gets a value of the selected dates.

    Declaration
    public DateTime this[int index] { get; set; }
    Parameters
    Type Name Description
    System.Int32 index

    index value

    Property Value
    Type Description
    System.DateTime

    return selected dates

    Methods

    Add(DateTime)

    Add an item

    Declaration
    public void Add(DateTime item)
    Parameters
    Type Name Description
    System.DateTime item

    item as date time

    Clear()

    Clear the selected dates.

    Declaration
    public void Clear()

    Contains(DateTime)

    Returns true when selected dates contains the provided date.

    Declaration
    public bool Contains(DateTime item)
    Parameters
    Type Name Description
    System.DateTime item

    item as date time

    Returns
    Type Description
    System.Boolean

    returns item value

    ContainsDate(DateTime)

    Returns true when date is present

    Declaration
    public bool ContainsDate(DateTime date)
    Parameters
    Type Name Description
    System.DateTime date

    date should be invoked

    Returns
    Type Description
    System.Boolean

    returns date

    CopyTo(DateTime[], Int32)

    Copies the selected dates to the specified index

    Declaration
    public void CopyTo(DateTime[] array, int arrayIndex)
    Parameters
    Type Name Description
    System.DateTime[] array

    date should stored as array

    System.Int32 arrayIndex

    value can be stored in index

    GetEnumerator()

    Gets the enumerator

    Declaration
    public IEnumerator<DateTime> GetEnumerator()
    Returns
    Type Description
    System.Collections.Generic.IEnumerator<System.DateTime>

    selected date should be returned

    IndexOf(DateTime)

    Returns the index of the item

    Declaration
    public int IndexOf(DateTime item)
    Parameters
    Type Name Description
    System.DateTime item

    invoke item

    Returns
    Type Description
    System.Int32

    item value

    Insert(Int32, DateTime)

    Inserts an item at the given index.

    Declaration
    public void Insert(int index, DateTime item)
    Parameters
    Type Name Description
    System.Int32 index

    invoke index value

    System.DateTime item

    invoke item value

    Remove(DateTime)

    Returns a true when item is removed

    Declaration
    public bool Remove(DateTime item)
    Parameters
    Type Name Description
    System.DateTime item

    invoke item

    Returns
    Type Description
    System.Boolean

    return date value

    RemoveAt(Int32)

    Removes the object at particular index

    Declaration
    public void RemoveAt(int index)
    Parameters
    Type Name Description
    System.Int32 index

    index value should be invoked

    Events

    CollectionChanged

    Invoked when the collection is changed.

    Declaration
    public event NotifyCollectionChangedEventHandler CollectionChanged
    Event Type
    Type
    System.Collections.Specialized.NotifyCollectionChangedEventHandler

    Implements

    System.Collections.Generic.ICollection<>
    System.Collections.Generic.IEnumerable<>
    System.Collections.IEnumerable
    System.Collections.Specialized.INotifyCollectionChanged

    Extension Methods

    DateTimeExtension.ToDateTime(Object)
    Back to top Generated by DocFX
    Copyright © 2001 - 2025 Syncfusion Inc. All Rights Reserved