Click here to Skip to main content
65,938 articles
CodeProject is changing. Read more.
Articles
(untagged)

.NET class to create and maintain vCard information

0.00/5 (No votes)
8 Apr 2003 1  
.NET class to create and maintain vCard information

Introduction

In a previous article, .NET class to create and maintain vCalendar information, I created a class to export calendar information to a vCalendar file. I have now also created an class to export contact information to a vCard file format. Again, I have tried to stick with the specs, but also tried to adapt the class to the way MS Outlook understands this format.

I am having some problems including the code directly in the article, so here is a brief overview of the vCard class.

Code

    Public Class vCard
        Public Class vEmails
        End Class

        Public Class vEmail
        End Class

        Public Class vURLs
        End Class

        Public Class vURL
        End Class

        Public Class vTelephones
        End Class

        Public Class vTelephone
        End Class

        Public Class vAddresss
        End Class

        Public Class vAddress
        End Class

        Public Enum vLocations
            HOME
            WORK
            CELL
        End Enum

        Public Enum vAddressTypes
            PARCEL  'Parcel post'

            DOM     'Domestic'

            INT     'International'

        End Enum

        Public Enum vPhoneTypes
            VOICE
            FAX
            MSG
        End Enum
    End Class


Also see my article .NET class to create and maintain vCalendar information

vCard specs

Here are some links to for the vCard specs (thanks Tommi):

License

This article has no explicit license attached to it but may contain usage terms in the article text or the download files themselves. If in doubt please contact the author via the discussion board below.

A list of licenses authors might use can be found here