.NET - make barcode image in C# or Visual Basic .NET - ByteScout

.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#

[vb]// 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]

VB.NET

[vbnet] ‘ 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”)
[/vbnet]

Tutorials:

prev
next