iCalendarEventImportException.Events Property
In This Article
Provides access to an event collection containing events which raised an exception.
Namespace: DevExpress.XtraScheduler.iCalendar
Assembly: DevExpress.XtraScheduler.v24.2.Core.Desktop.dll
NuGet Package: DevExpress.Scheduler.CoreDesktop
#Declaration
#Property Value
Type | Description |
---|---|
DevExpress. |
A DevExpress. |
#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);
}
See Also