ByteScout QR Code SDK - C# - Binary Data - 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 QR Code SDK – C# – Binary Data

  • Home
  • /
  • Articles
  • /
  • ByteScout QR Code SDK – C# – Binary Data

ByteScout QR Code SDK – C# – Binary Data

Program.cs

using System.Diagnostics;
using System.Text;
using Bytescout.BarCode;

namespace QRCodeWithBinaryData
{
	class Program
	{
		static void Main(string[] args)
		{
			// Create and activate QRCode component instance
			using (QRCode barcode = new QRCode())
			{
				barcode.RegistrationName = "demo";
				barcode.RegistrationKey = "demo";

				// Sample byte array to use as value 
				byte[] byteArray = new byte[] { 0, 10, 11, 12, 13, 14, 15, 0xFF };

				// Set value by converting byte array to string 
				barcode.Value = Encoding.ASCII.GetString(byteArray);

				// Save barcode image
				barcode.SaveImage("result.png");

				// Open the image in default associated application (for the demo purpose)
				Process.Start("result.png");
			}
		}
	}
}


  Click here to get your Free Trial version of the SDK

Tutorials:

prev
next