VEvent Class

An event of an iCalendar object (VEVENT): a meeting, an appointment or an all-day event, with its recurrence.

public sealed class VEvent : CalendarComponent
Inheritance
CalendarComponent VEvent

Constructors

NameDescription
VEvent()Creates an event.

VEvent()

VEvent.cs

Creates an event.

public VEvent()

Properties

NameDescription
AttendeesGets the attendees (ATTENDEE).
CategoriesGets the categories (CATEGORIES).
DescriptionGets or sets the description (DESCRIPTION).
DurationGets or sets the duration (DURATION), which an event has instead of an end.
EndGets or sets the end (DTEND), exclusive: the day after the last day of an all-day event.
ExceptionDatesGets the dates of the occurrences the recurrence excludes (EXDATE).
IsAllDayGets whether the event lasts whole days: its start is a date.
LastModifiedGets or sets when the event was last modified (LAST-MODIFIED).
LocationGets or sets the location (LOCATION).
OrganizerGets or sets the organizer (ORGANIZER).
RecurrenceDatesGets the dates of the occurrences the recurrence adds (RDATE).
RecurrenceIdGets or sets the original start of the occurrence this event replaces (RECURRENCE-ID), for an exception of a recurring event.
RecurrenceRuleGets or sets the recurrence rule (RRULE).
SequenceGets or sets the revision of the event (SEQUENCE).
StampGets or sets when the object was written (DTSTAMP).
StartGets or sets the start (DTSTART).
StatusGets or sets the status (STATUS): TENTATIVE, CONFIRMED or CANCELLED.
SummaryGets or sets the summary, the subject of the event (SUMMARY).
TransparencyGets or sets whether the event blocks time (TRANSP: OPAQUE or TRANSPARENT).
UidGets or sets the unique identifier (UID).

Attendees

VEvent.cs

Gets the attendees (ATTENDEE).

public IReadOnlyList<CalendarAttendee> Attendees { get; }

Categories

VEvent.cs

Gets the categories (CATEGORIES).

public IReadOnlyList<string> Categories { get; }

Property value

IReadOnlyList<string>

Description

VEvent.cs

Gets or sets the description (DESCRIPTION).

public string? Description { get; set; }

Property value

string?

Duration

VEvent.cs

Gets or sets the duration (DURATION), which an event has instead of an end.

public TimeSpan? Duration { get; set; }

Property value

TimeSpan?

Gets or sets the end (DTEND), exclusive: the day after the last day of an all-day event.

public CalendarDateTime? End { get; set; }

Property value

CalendarDateTime?

ExceptionDates

VEvent.cs

Gets the dates of the occurrences the recurrence excludes (EXDATE).

public IReadOnlyList<CalendarDateTime> ExceptionDates { get; }

IsAllDay

VEvent.cs

Gets whether the event lasts whole days: its start is a date.

public bool IsAllDay { get; }

Property value

bool

LastModified

VEvent.cs

Gets or sets when the event was last modified (LAST-MODIFIED).

public CalendarDateTime? LastModified { get; set; }

Property value

CalendarDateTime?

Location

VEvent.cs

Gets or sets the location (LOCATION).

public string? Location { get; set; }

Property value

string?

Organizer

VEvent.cs

Gets or sets the organizer (ORGANIZER).

public CalendarAttendee? Organizer { get; set; }

Property value

CalendarAttendee?

RecurrenceDates

VEvent.cs

Gets the dates of the occurrences the recurrence adds (RDATE).

public IReadOnlyList<CalendarDateTime> RecurrenceDates { get; }

RecurrenceId

VEvent.cs

Gets or sets the original start of the occurrence this event replaces (RECURRENCE-ID), for an exception of a recurring event.

public CalendarDateTime? RecurrenceId { get; set; }

Property value

CalendarDateTime?

RecurrenceRule

VEvent.cs

Gets or sets the recurrence rule (RRULE).

public RecurrenceRule? RecurrenceRule { get; set; }

Property value

RecurrenceRule?

Sequence

VEvent.cs

Gets or sets the revision of the event (SEQUENCE).

public int? Sequence { get; set; }

Property value

int?

Gets or sets when the object was written (DTSTAMP).

public CalendarDateTime? Stamp { get; set; }

Property value

CalendarDateTime?

Gets or sets the start (DTSTART).

public CalendarDateTime? Start { get; set; }

Property value

CalendarDateTime?

Status

VEvent.cs

Gets or sets the status (STATUS): TENTATIVE, CONFIRMED or CANCELLED.

public string? Status { get; set; }

Property value

string?

Summary

VEvent.cs

Gets or sets the summary, the subject of the event (SUMMARY).

public string? Summary { get; set; }

Property value

string?

Transparency

VEvent.cs

Gets or sets whether the event blocks time (TRANSP: OPAQUE or TRANSPARENT).

public string? Transparency { get; set; }

Property value

string?

Gets or sets the unique identifier (UID).

public string? Uid { get; set; }

Property value

string?

Methods

NameDescription
AddAttendee(CalendarAttendee)Adds an attendee.
AddExceptionDate(CalendarDateTime)Adds a date to the dates the recurrence excludes (EXDATE).
GetOccurrences()Returns the start times of the occurrences of the event: its start, the dates of its recurrence rule and RDATE, without the dates of EXDATE. The times are in the basis of the start (UTC, local in its time zone, or floating).
SetCategories(IEnumerable<string>)Sets the categories.
ToMapiAppointmentBuilder()Creates the builder of an appointment of Outlook from the event: its times in UTC (with the time zones of the calendar), its recurrence when Outlook can represent it, its attendees and its first reminder.

AddAttendee(CalendarAttendee)

VEvent.cs

Adds an attendee.

public void AddAttendee(CalendarAttendee attendee)

Parameters

attendee CalendarAttendee
The attendee.

AddExceptionDate(CalendarDateTime)

VEvent.cs

Adds a date to the dates the recurrence excludes (EXDATE).

public void AddExceptionDate(CalendarDateTime date)

Parameters

date CalendarDateTime
The original start of the occurrence.

GetOccurrences()

VEvent.cs

Returns the start times of the occurrences of the event: its start, the dates of its recurrence rule and RDATE, without the dates of EXDATE. The times are in the basis of the start (UTC, local in its time zone, or floating).

public IEnumerable<DateTime> GetOccurrences()

Returns

IEnumerable<DateTime> The start times, in order; infinitely many for a rule without an end.

Exceptions

NotSupportedException
The recurrence rule has parts RecurrenceRule.GetOccurrences does not support.

SetCategories(IEnumerable<string>)

VEvent.cs

Sets the categories.

public void SetCategories(IEnumerable<string> categories)

Parameters

categories IEnumerable<string>
The categories.

ToMapiAppointmentBuilder()

VEvent.cs

Creates the builder of an appointment of Outlook from the event: its times in UTC (with the time zones of the calendar), its recurrence when Outlook can represent it, its attendees and its first reminder.

public MapiAppointmentBuilder ToMapiAppointmentBuilder()

Returns

MapiAppointmentBuilder The builder.