.NET - make barcode image in C# or Visual Basic .NET - 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!

.NET – make barcode image in C# or Visual Basic .NET

  • Home
  • /
  • Articles
  • /
  • .NET – make barcode image in C# or Visual Basic .NET

Make barcode image in .NET using Barcode Generator SDK and source code samples below. Simply copy and paste C# or Visual Basic .NET code for easy barcode image making in .NET.

C#

// Create new .net barcode object 
           Barcode barcode = new Barcode();

           // Set symbology for barcode image
           barcode.Symbology = SymbologyType.Code39;
           // Set value for new barcode
           barcode.Value = "Sample";

           // Make barcode and save to image
           barcode.SaveImage("result.png");

           // Show image in default image viewer
           Process.Start("result.png");

VB.NET

 ' Create new .net barcode object
       Dim barcode As New Barcode()

       ' Set symbology for new barcode image
       barcode.Symbology = SymbologyType.Code39
       ' Set value for barcode image
       barcode.Value = "Sample"

       ' Make barcode image and save to file
       barcode.SaveImage("result.png")

Tutorials:

prev
next