Click to Rate and Give Feedback
MSDN
MSDN Library
User Interface
Gadgets
Windows Sidebar
Collections
Contacts

  Switch on low bandwidth view
Contacts Collection

A collection of System.Contact objects.

Note   Objects of type System.Contact can only be accessed through the Contacts collection. This collection is a member of System.ContactManager.

Syntax

[ collContact = ] System.ContactManager.Contacts
[ oInstance = ] System.ContactManager.Contacts.item(iIndex)
[ iCount = ] System.ContactManager.Contacts.count

Possible Values

collContactA collection of System.Contact objects.
oInstanceAn instance of the object from the specified index within the collection.
iIndexRequired. Integer that specifies the zero-based index of the item to be returned.
iCountAn integer that receives the count of items in the collection.

Remarks

Each System.Contact corresponds to a Microsoft Windows Mail (formerly Outlook Express) .contact file that Windows creates for each individual Windows Contacts entry.

Example

The following example demonstrates how to access a Contacts collection from System.ContactManager, select a single Contact from the collection, and retrieve the city property of that Contact.

// collContact is a collection of System.Contact objects.
var collContact = System.ContactManager.Contacts; 

// oContact is a System.Contact object. 
// oContact is item 3 in the collContact collection.
var oContact = collContact.item(3);  

// strContactCity is the value of the city property of oContact.
var strContactCity = oContact.city;

Applies To

System.ContactManager

See Also

Tags What's this?: Add a tag
Community Content   What is Community Content?
Add new content RSS  Annotations
Processing
© 2009 Microsoft Corporation. All rights reserved. Terms of Use  |  Trademarks  |  Privacy Statement
Page view tracker