-
Notifications
You must be signed in to change notification settings - Fork 231
Working with non standard (X prefixed) properties
Rian Stockbower edited this page Nov 24, 2017
·
4 revisions
RFC-5545 allows for non-standard properties, prefixed with a X-
. Outlook, Google Calendar, and many other calendar applications make use of these non-standard properties for their own purposes. ical.net makes no attempt to support all of them, because they can be literally anything.
var now = DateTime.Now;
var calendarEvent = new CalendarEvent
{
Start = new CalDateTime(now),
End = new CalDateTime(now.AddHours(1)),
Properties =
{
new CalendarProperty("X-RESPONSE-COMMENT", "Some value")
},
};
This will return the name-value pair that you added above.
var retrievedProperty = calendarEvent.Properties
.FirstOrDefault(p => p.Name.Equals("X-RESPONSE-COMMENT"));