VCard 2.0.0
dotnet add package VCard --version 2.0.0
NuGet\Install-Package VCard -Version 2.0.0
<PackageReference Include="VCard" Version="2.0.0" />
paket add VCard --version 2.0.0
#r "nuget: VCard, 2.0.0"
// Install VCard as a Cake Addin #addin nuget:?package=VCard&version=2.0.0 // Install VCard as a Cake Tool #tool nuget:?package=VCard&version=2.0.0
VCard
This Package enables you to create virtual contact cards(VCF).
You can easily create VCards with single or multiple Phone numbers and Emails in a single contact without much hazzle..
Installing this package: Add this nuget package to your project..
dotnet add package VCard --version 2.0.0
Create a new Contact: Add the following namespaces to your project.
using VCard.Models;
using VCard.Helpers;
Code to create a new contact:
Contact contact = new Contact
{
FirstName = "Satvik",
LastName = "Rajnarayanan",
Addresses = new System.Collections.Generic.List<Address>()
{
new Address{Description="Example home address", Type="Home" }
},
Phones = new System.Collections.Generic.List<Phone>()
{
new Phone{Number="0000000000", Type="Home"}
},
Email = new System.Collections.Generic.List<Email>()
{
{ new Email(){ Mail="youremail", Type="Home"} }
},
FormattedName = "Satvik",
Organization = "Nuget",
Title = "Satvik"
};
To get the vcard use the following command:
CardHelper.CreateVCard(contact);
This returns the VCard as a string which could be used to save it in your system..
string contents = FileHelper.CreateVCard(contact);
File.WriteAllText("FileName.vcf", contents);
Please make sure that you use the file extention as vcf..
Product | Versions Compatible and additional computed target framework versions. |
---|---|
.NET Framework | net472 is compatible. net48 was computed. net481 was computed. |
This package has no dependencies.
NuGet packages
This package is not used by any NuGet packages.
GitHub repositories
This package is not used by any popular GitHub repositories.
Added support for VCard Version 3.0, Date of birth and an option to read a vcard using it's contents as a string...