This code is straight from the documentation. It'll loop through all the contacts and trace their emails to the debug window:
code:
Debug.Trace("Contacts in the user's contact list:");
var Contacts = Messenger.MyContacts;
var e = new Enumerator(Contacts);
for(; !e.atEnd(); e.moveNext())
{
var Contact = e.item();
Debug.Trace(" " + Contact.Email);
}