Skip to main content
A newer version of this page is available. .

WorkDaysCollection.AddHoliday(DateTime, String) Method

Creates and adds a Holiday class instance to the WorkDaysCollection if the collection does not contain the specified item.

Namespace: DevExpress.XtraScheduler

Assembly: DevExpress.XtraScheduler.v18.2.Core.dll

Declaration

public int AddHoliday(
    DateTime date,
    string displayName
)

Parameters

Name Type Description
date DateTime

A DateTime value, representing the date of the holiday.

displayName String

A String, representing a name of the holiday to display.

Returns

Type Description
Int32

An integer, representing the position into which the new element was inserted.

The following code snippet (auto-collected from DevExpress Examples) contains a reference to the AddHoliday(DateTime, String) method.

Note

The algorithm used to collect these code examples remains a work in progress. Accordingly, the links and snippets below may produce inaccurate results. If you encounter an issue with code examples below, please use the feedback form on this page to report the issue.

See Also