The C# code guide below shows how to makeEAN-8 barcode using C# in .NET project. Some other ways you may need: creating EAN-8 in .NET WinForms using Barcode Control and drawing EAN-8 in web application using Barcode Control.
using System; using System.Drawing; using System.Drawing.Imaging; usingPQScan.BarcodeCreator; namespace EAN8GeneratorInCSharp { classProgram { staticvoid Main(string[] args) { //Create an instance of PQScan.BarcodeCreator.Barcodeobject. Barcode ean8 = new Barcode(); //Set barcode date to encode ean8.Data = "1234567"; //Set barcode type ean8.BarType = BarCodeType.EAN8; //Set barcode image width ean8.Width = 100; //Set barcode image height ean8.Height = 80; //Set 1d barcode human-readable text to display ean8.ShowText = true; //Set barcode image foregroud color ean8.BarcodeColor = Color.Black; //Set barcode image back ground color ean8.BackgroundColor = Color.White; //Set barcode image format ean8.PictureFormat = ImageFormat.Gif; //Save barcode image to file ean8.CreateBarcode("ean8-csharp.gif"); } } }