Create Simple QR Code - C#
QR Code SDK sample in C# demonstrating ‘Create Simple QR Code’
Program.cs
using System.Diagnostics;
using Bytescout.BarCode;
namespace GeneralExample
{
class Program
{
static void Main(string[] args)
{
// Create and activate QRCode instance
using (QRCode barcode = new QRCode())
{
barcode.RegistrationName = "demo";
barcode.RegistrationKey = "demo";
// Set value
barcode.Value = "ABCDEFGHIJKLMNOPQRSTUVWXYZ abcdefghijklmnopqrstuvwxyz 1234567890";
// Uncomment if you don't need margins
//barcode.Margins = new Margins(0, 0, 0, 0);
//barcode.DrawQuietZones = false;
// Save barcode image to file
barcode.SaveImage("result.png");
}
// Open the image in default image viewer (for demo purpose)
Process.Start("result.png");
}
}
}