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

iCalendarEventImportException.Events Property

Provides access to an event collection containing events which raised an exception.

Namespace: DevExpress.XtraScheduler.iCalendar

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

Declaration

public VEventCollection Events { get; }

Property Value

Type Description
DevExpress.XtraScheduler.iCalendar.Components.VEventCollection

A DevExpress.XtraScheduler.iCalendar.Components.VEventCollection object representing a collection of calendar event components.

Remarks

Use the Events property to indicate events which caused an exception in data exchange operations. The following try…catch code snippet illustrates how you can accomplish this:


try {
    using(Stream stream = dialog.OpenFile())
        ImportAppointments(stream);
}
catch(iCalendarEventImportException ex) {
    VEventCollection events = ex.Events;
    int count = events.Count;
    string message = String.Empty;
    for(int i = 0; i < count; i++) {
        VEvent ev = ex.Events[i];
        message += String.Format("Cannot import event '{0}' started on {1:D} at {2}\n",
         ev.Summary.Value, ev.Start.Value.Date, ev.Start.Value.TimeOfDay);
    }
    XtraMessageBox.Show(message, "Error", MessageBoxButtons.OK, MessageBoxIcon.Error);
}

The following code snippet (auto-collected from DevExpress Examples) contains a reference to the Events property.

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