.NET Barcode Generator SDK

Create & Generate Barcode in C#
CnetSDK .NET Barcode Generator & Creator SDK is a combination of linear barcode generator library and 2d barcode generator library for C#.NET windows and web applications development, which includes EAN barcode generator for C#, UPC barcode generator for C#, QR barcode generator for C#, etc. It is widely used to create, make and generate high print quality linear/1d and matrix/2d barcodes, like QR Code, Data Matrix, PDF-417, Code 39, Code 128, EAN-13, and UPC-A.
ADD BARCODE GENERATOR LIBRARY TO C# PROJECT
This C# tutorial will tell you how to integrate CnetSDK .NET Barcode Generator & Creator library to your C#.NET project, and how to use mature barcode generator library APIs to create, make and generate barcode.

To begin with, please download .NET barcode generator free trial library online and add CnetSDK.Barcode.Generator.Trial.dll to your Visual C#.NET project reference. All mature 1d and 2d barcodes generator and creator features are compiled into this single .NET library dll.

Please Note: a watermark ("www.cnetsdk.com") will be shown on each generated barcode image randomly if you are using free trial library.
USE APIS & METHODS TO CREATE BARCODE IN C#
You can use the following barcode generator & creator API methods to make and generate 1d and 2d barcodes in C#.NET programming projects. Your barcode can be encoded to a local image file (JPEG/PNG/BMP/GIF/TIFF), Stream, Bitmap, or Byte Array using C# programming code. All barcodes created by CnetSDK .NET Barcode Generator & Creator SDK are with high print quality and compatible with ISO/IEC barcode specifications.
// Create, generate, and encode barcode to a local image file.
public void CreateBarcode(string filename)
 
// Create, generate, and encode barcode to a Stream object.
public void CreateBarcode(Stream stream)
 
// Create, generate, and encode barcode to a byte[] object.
public byte[] CreateBarcodeInBytes()
 
// Create, generate, and encode barcode to a Bitmap object.
public Bitmap CreateBarcode()
.NET BARCODE GENERATOR C# CODE EXAMPLES
We provide two pieces of C# programming codes for your quick evaluation. The first C# code example illustrates how to create and generate QR Code barcode in C# project and save it as a PNG image. And the second one sets more barcode generation properties for your reference. You can make and generate desired 1d or 2d barcodes to meet your C# application requirement.
1. Quick to Create and Generate Barcode in C# Programming

using System;
using CnetSDK.Barcode.Generator.Trial;

namespace CsharpBarcodeGeneratorSample
{
    class Program
    {
        static void Main(string[] args)
       {
            CSBarcode csharpbarcode = new CSBarcode();
            csharpbarcode.BarcodeData = "www.cnetsdk.com";
            csharpbarcode.BarcodeType = CSBarcodeType.QRCode;
            csharpbarcode.BarcodeWidth = 200;
            csharpbarcode.BarcodeHeight = 200;
            csharpbarcode.QRCodeErrorCorrectionLevel = ECLMode.L
            csharpbarcode.CreateBarcode("CnetSDKQRCode.png");
        }
    }
}
2. Make and Generate a Barcode in C# with Properties Setting

using System;
using System.Drawing;
using System.Drawing.Imaging;
using CnetSDK.Barcode.Generator.Trial;

namespace CsharpCode128GeneratorSample
{
    classProgram
    {
        staticvoid Main(string[] args)
        {
            // Create a CnetSDK barcode object.
            CSBarcode csharpbarcode = new CSBarcode();

            // Define data information that will be encoded into your barcode.
            csharpbarcode.BarcodeData = "www.cnetsdk.com";

            // Define a barcode type to draw and create.
            csharpbarcode.BarcodeType = CSBarcodeType.Code128;

            // Set image width of your Code 128 barcode.
            csharpbarcode.BarcodeWidth = 300;

            // Set image height of your Code 128 barcode.
            csharpbarcode.BarcodeHeight = 100;

            // Set foreground color of Code 128 barcode.
            csharpbarcode.BarColor = Color.Black;

            // Set background color of Code 128 barcode.
            csharpbarcode.BackgroundColor = Color.White;

            // Define an image file format to save your Code 128 barcode.
            csharpbarcode.CSPictureFormat = ImageFormat.Jpeg;

            // Save Code 128 barcode image to a local JPEG image file.
            csharpbarcode.CreateBarcode("CnetSDKCode128.jpeg");     
        }
    }
}
TUTORIALS FOR .NET WINDOWS & WEB APPLICATIONS
CnetSDK .NET Barcode Generator SDK library can be used to draw, make and generate barcodes for .NET windows and web applications. If you are developing a .NET WinForms or ASP.NET web project, you may directly see online tutorial for Barcode Generate and Create for ASP.NET Web Application, and Barcode Generate and Create for .NET Windows Forms Application.

If you are creating a VB.NET application and want to have a quick evaluation of our CnetSDK .NET Barcode Generator SDK, you may also see this online barcode generation guide: How to Draw, Create and Generate Barcode Using VB.NET.
MAKE & GENERATE 1D & 2D BARCODES
CnetSDK .NET Barcode Generator SDK is an independent barcode creator & maker library. It includes linear and 2d barcodes generation features and can be used as an EAN barcode generator & maker, UPC barcode generator & maker, and 2d QR barcode generator & maker for your C# application development. Barcode types listed below are supported.

.NET QR Code Generator & Maker

.NET Data Matrix Generator & Maker

.NET PDF 417 Generator & Maker

.NET Aztec Generator & Maker

.NET Code 39 Generator & Maker

.NET Code 128 Generator & Maker

.NET EAN-13 Generator & Maker

.NET UPC-A Generator & Maker

.NET EAN-8  Generator & Maker