Edit

Share via


_Items.IncludeRecurrences Property

Definition

Returns a Boolean (bool in C#) that indicates True if the Items collection should include recurrence patterns. Read/write.

public:
 property bool IncludeRecurrences { bool get(); void set(bool value); };
public bool IncludeRecurrences { get; set; }
Public Property IncludeRecurrences As Boolean

Property Value

Remarks

This property only has an effect if the Items collection contains appointments and is not sorted by any property other than Start in ascending order. The default value is False. Use this property when you want to retrieve all appointments for a given date, where recurring appointments would not normally appear because they are not associated with any specific date. If you need to sort and filter on appointment items that contain recurring appointments, you must do so in this order: sort the items in ascending order, set IncludeRecurrences to True, and then filter the items. For a code sample showing this order, see the second example below. If the collection includes recurring appointments with no end date, setting the property to True may cause the collection to be of infinite count. Be sure to include a test for this in any loop. You should not use Count property of Items collection when iterating Items collection with IncludeRecurrence property set to True. The value of Count will be an undefined value.

Caution: Filtering on a sorted list of occurrences will cause the IncludeRecurrences property not to work as expected. For example, the following sequence will return all appointment occurrences; recurring and non-recurring: (1) Sort by Start property (2) Set property to false (3) call Restrict (i.e., filter).

Applies to