ByteScout Barcode Suite - C# - Generate vCard QR Code with Barcode SDK - ByteScout
Announcement
Our ByteScout SDK products are sunsetting as we focus on expanding new solutions.
Learn More Open modal
Close modal
Announcement Important Update
ByteScout SDK Sunsetting Notice
Our ByteScout SDK products are sunsetting as we focus on our new & improved solutions. Thank you for being part of our journey, and we look forward to supporting you in this next chapter!

ByteScout Barcode Suite – C# – Generate vCard QR Code with Barcode SDK

  • Home
  • /
  • Articles
  • /
  • ByteScout Barcode Suite – C# – Generate vCard QR Code with Barcode SDK

How to generate vcard qr code with barcode sdk in C# and ByteScout Barcode Suite

Learn to generate vcard qr code with barcode sdk in C#

We made thousands of pre-made source code pieces for easy implementation in your own programming projects. ByteScout Barcode Suite: the bundle that privides 3 SDK products to generate barcodes (Barcode SDK), read barcodes (Barcode Reaer SDK) and read and write spreadsheets (Spreadsheet SDK). It can generate vcard qr code with barcode sdk in C#.

The SDK samples given below describe how to quickly make your application do generate vcard qr code with barcode sdk in C# with the help of ByteScout Barcode Suite. IF you want to implement the functionality, just copy and paste this code for C# below into your code editor with your app, compile and run your application. If you want to use these C# sample examples in one or many applications then they can be used easily.

If you want to try other source code samples then the free trial version of ByteScout Barcode Suite is available for download from our website. Just try other source code samples for C#.

On-demand (REST Web API) version:
 Web API (on-demand version)

On-premise offline SDK for Windows:
 60 Day Free Trial (on-premise)

Program.cs
      
using System.Diagnostics; using System.Drawing.Imaging; using System.IO; using Bytescout.BarCode; using Thought.vCards; namespace GenerateVCardQRCode { /// <summary> /// This example demonstrates generation of QR Code encoded vCard. /// It uses vCard library by David Pinch: /// /// vCard Class Library for .NET (Version 0.4; LGPL license) /// Copyright (c) 2007-2009 David Pinch /// http://www.thoughtproject.com/Libraries/vCard/ /// /// </summary> class Program { static void Main(string[] args) { // Generate vCard vCard vCard = new vCard(); vCard.GivenName = "Forrest"; vCard.FamilyName = "Gump"; vCard.Organization = "Bubba Gump Shrimp Co."; vCard.Title = "Shrimp Man"; vCard.Phones.Add(new vCardPhone("(111) 555-1212", vCardPhoneTypes.Home)); vCard.EmailAddresses.Add(new vCardEmailAddress("forrestgump@example.com", vCardEmailAddressType.Internet)); vCardDeliveryAddress address = new vCardDeliveryAddress(); address.AddressType = vCardDeliveryAddressTypes.Home; address.Street = "100 Waters Edge"; address.City = "Baytown"; address.Region = "LA"; address.PostalCode = "30314"; address.Country = "United States of America"; vCard.DeliveryAddresses.Add(address); // Save vCard data to string vCardStandardWriter writer = new vCardStandardWriter(); StringWriter stringWriter = new StringWriter(); writer.Write(vCard, stringWriter); // Create Bytescout.Barcode instance using (Barcode barcode = new Barcode()) { // Set barcode type barcode.Symbology = SymbologyType.QRCode; // Set barcode value barcode.Value = stringWriter.ToString(); // Save barcode to image barcode.SaveImage("result.png", ImageFormat.Png); // Open generated barcode image in default associated application Process.Start("result.png"); } } } }

ON-PREMISE OFFLINE SDK

60 Day Free Trial or Visit ByteScout Barcode Suite Home Page

Explore ByteScout Barcode Suite Documentation

Explore Samples

Sign Up for ByteScout Barcode Suite Online Training

ON-DEMAND REST WEB API

Get Your API Key

Explore Web API Docs

Explore Web API Samples

VIDEO

ON-PREMISE OFFLINE SDK

60 Day Free Trial or Visit ByteScout Barcode Suite Home Page

Explore ByteScout Barcode Suite Documentation

Explore Samples

Sign Up for ByteScout Barcode Suite Online Training

ON-DEMAND REST WEB API

Get Your API Key

Explore Web API Docs

Explore Web API Samples

Tutorials:

prev
next