O'Reilly logo

Windows® Phone 8 Unleashed by Daniel Vaughan

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Converting a Stored Contact to and from a vCard

vCard is a standard file format used for electronic business cards. The stored contact API allows you to convert a StoredContact to and from a vCard.

The ContactInformation class contains a ParseVcardAsnc method, which asynchronously converts an IInputStream of vCard data and then returns a populated ContactInformation object, as demonstrated by the following example:

ContactStore store = await ContactStore.CreateOrOpenAsync();ContactInformation contactInformation    = await ContactInformation.ParseVcardAsync(inputStream);StoredContact contact = new StoredContact(store, contactInformation);

Conversely, a StoredContact object is converted to an IInputStream of vCard ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required