Compartilhar via


AppointmentCollection.Restrict Method

3/29/2010

Returns a new AppointmentCollection object that contains only Appointment objects that match a set of criteria, providing a filtered view of a collection of appointments.

Namespace: Microsoft.WindowsMobile.PocketOutlook
Assembly: Microsoft.WindowsMobile.PocketOutlook (in microsoft.windowsmobile.pocketoutlook.dll)

Syntax

public AppointmentCollection Restrict (
    string restriction
)
'Declaration
Public Function Restrict ( _
    restriction As String _
) As AppointmentCollection

Parameters

  • restriction
    A string that defines which items to find. The string must contain a Boolean expression that evaluates to either TRUE or FALSE for any item. Enclose property names between brackets, and enclose string property values between quotes. Comparison operators are the following "<, <=, >, >=, =, <>", and you can combine expressions with AND and OR.

Return Value

The Collection of Items matching the Restriction.

Remarks

A restriction match requires that the item include a value for the property. For example, if you do not set the e-mail address for a contact, the contact will not be found using the restriction string [Email1Address]<>"me@microsoft.com", even though the value of Email1Address is not "me@microsoft.com".

Thread Safety

Any public static (Shared in Visual Basic) members of this type are thread-safe. Any instance members are not guaranteed to be thread-safe.

See Also

Reference

AppointmentCollection Class
AppointmentCollection Members
Microsoft.WindowsMobile.PocketOutlook Namespace