Skip to main content

Appointment(AppointmentType, DateTime, TimeSpan, String, Object) Constructor

Initializes a new instance of the Appointment class with the specified type, start date, duration, subject and identifier.

Namespace: DevExpress.XtraScheduler

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

#Declaration

public Appointment(
    AppointmentType type,
    DateTime start,
    TimeSpan duration,
    string subject,
    object id
)

#Parameters

Name Type Description
type AppointmentType

An AppointmentType enumeration value that specifies the type of the appointment. This value is assigned to the Appointment.Type property.

start DateTime

A DateTime value that specifies the start date of the appointment. This value is assigned to the Appointment.Start property.

duration TimeSpan

A TimeSpan value that specifies the duration of the appointment. This value is assigned to the Appointment.Duration property.

subject String

A String value that specifies the subject of the appointment. This value is assigned to the Appointment.Subject property.

id Object

An object specifying the unique identifier for an appointment.

#Remarks

NOTE

The duration.Ticks should be greater than or equal to 0.

NOTE

Don't specify the AppointmentType.Occurrence, AppointmentType.ChangedOccurrence, or AppointmentType.DeletedOccurrence as the type of the appointment being created. In these cases, Appointment.CreateException should be used instead to create an exception for the recurring series.

NOTE

The appointment identifier should be unique and synchronized with the corresponding data source field. Use the SchedulerStorage.SetAppointmentId method to specify the Id for an appointment.

See Also