-
Notifications
You must be signed in to change notification settings - Fork 231
Deserialize an ics file
Rian Stockbower edited this page Nov 24, 2017
·
5 revisions
ics
files are like containers: they can contain one or more VCALENDAR
s, and each VCALENDAR
can contain many elements.
var calendar = Calendar.Load(icalText);
var manyCalendars = CalendarCollection.Load(severalCalendarsText);
With v4, it's now possible to deserialize smaller entities like CalendarEvent
s:
const string veventText = @"BEGIN:VEVENT
CREATED:20060717T210517Z
LAST-MODIFIED:20060717T210718Z
DTSTAMP:20060717T210718Z
UID:uuid1153170430406
SUMMARY:Test event
DTSTART:20060718T100000
DTEND:20060718T110000
LOCATION:Daywest
END:VEVENT";
var calendarEvent = Calendar.Load<CalendarEvent>(veventTest);