How to set a One-Time only event using DDay iCal

94 views Asked by At

I am trying to setup a One-Time only event using the DDay iCal library.

The FrequencyType lists the following:

public enum FrequencyType
{
    None = 0,
    Secondly = 1,
    Minutely = 2,
    Hourly = 3,
    Daily = 4,
    Weekly = 5,
    Monthly = 6,
    Yearly = 7,
}

Currently in my application the user is given options for creating a One-Time or Daily events.

For Daily this does the job:

FrequencyType.Daily

and this code:

Event evt = iCal.Create<Event>();
RecurrencePattern rp = new RecurrencePattern(frequencyType);
evt.RecurrenceRules.Add(rp);

I have removed other details for brevity.

How do I go about setting a One-Time only event?

0

There are 0 answers