Share via


TaskCollection.Restrict Method

3/29/2010

Creates a new TaskCollection object that contains only those Task items that match a set of filter criteria.

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

Syntax

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

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

TaskCollection Class
TaskCollection Members
Microsoft.WindowsMobile.PocketOutlook Namespace