Skip to main content

TimeSlotCollection.Add(TimeSpan, String, String) Method

Appends a new time slot with the specified value, display name and menu caption to the collection.

Namespace: DevExpress.XtraScheduler

Assembly: DevExpress.XtraScheduler.v23.2.Core.Desktop.dll

NuGet Package: DevExpress.Scheduler.CoreDesktop

Declaration

public int Add(
    TimeSpan val,
    string displayName,
    string menuCaption
)

Parameters

Name Type Description
val TimeSpan

A TimeSpan value that specifies the value of the time slot. This value is assigned to the TimeSlot.Value property.

displayName String

A String value that specifies the display name of the time slot. This value is assigned to the UserInterfaceObject.DisplayName property.

menuCaption String

A String value that specifies the menu caption of the time slot. This value is assigned to the UserInterfaceObject.MenuCaption property.

Returns

Type Description
Int32

An integer value indicating the position at which the new element was inserted.

Remarks

This method creates a new TimeSlot object, initializes it with the specified settings and adds it to the end of the collection.

Note

The Ticks property value of the val parameter should be greater than 0.

See Also