Share via


ContactCollection Class

3/29/2010

Represents the collection of Contact items in a Contact folder.

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

Syntax

[DefaultMemberAttribute("Item")] 
public class ContactCollection : PimItemCollection, IEnumerable
'Declaration
<DefaultMemberAttribute("Item")> _
Public Class ContactCollection
    Inherits PimItemCollection
    Implements IEnumerable

Inheritance Hierarchy

System.Object
   Microsoft.WindowsMobile.PocketOutlook.PimItemCollection
    Microsoft.WindowsMobile.PocketOutlook.ContactCollection

Example

The code below shows how to data bind a combo box to the list of contacts. In this case, the "FileAs" property will be displayed on the combo box, the "ItemId" property will be the property used for comboBox1.SelectedValue.

OutlookSession mySession = new OutlookSession();
this.comboBox1.DataSource = this.mySession.Contacts.Items;
this.comboBox1.DisplayMember = "FileAs";
this.comboBox1.ValueMember = "ItemId";

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 Members
Microsoft.WindowsMobile.PocketOutlook Namespace