This sample code snippet from the following complete code sample uses the IMessenger::MyContacts property of the communicator object (Messenger) to get a collection of IMessengerContact objects. The contact object is passed as an argument to the createContactItem method, which retrieves presence information and adds the contact to the contactListView.
Copy Code | |
---|---|
contactCollection = (IMessengerContacts)communicator.MyContacts; if (contactCollection != null) { foreach (IMessengerContact contactItem in contactCollection) { createContactItem(contactItem); } } |