Creates a typed object that is a direct child of the iCalendar itself. Generally, you would invoke this method to create an Event, Todo, Journal, TimeZone, FreeBusy, or other base component type.

Namespace: iCal
Assembly: ICalVCard (in ICalVCard.dll) Version: 1.0.0.0 (1.0.0.0)

Syntax

C#
public T Create<T>()
where T : ICalendarComponent
Visual Basic
Public Function Create(Of T As ICalendarComponent) As T
Visual C++
public:
generic<typename T>
where T : ICalendarComponent
virtual T Create() sealed

Type Parameters

T
The type of object to create

Return Value

An object of the type specified

Examples

To create an event, use the following:
CopyC#
IICalendar iCal = new iCalendar();

Event evt = iCal.Create<Event>();
This creates the event, and adds it to the Events list of the iCalendar.

See Also