ContactCollection.Restrict Method
3/29/2010
Creates a new ContactCollection object that contains only those Contact items that match a set of filter criteria.
Namespace: Microsoft.WindowsMobile.PocketOutlook
Assembly: Microsoft.WindowsMobile.PocketOutlook (in microsoft.windowsmobile.pocketoutlook.dll)
Syntax
public ContactCollection Restrict (
string query
)
'Declaration
Public Function Restrict ( _
query As String _
) As ContactCollection
Parameters
- query
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
ContactCollection Class
ContactCollection Members
Microsoft.WindowsMobile.PocketOutlook Namespace