IRONSOFTWAREHOME

Using IronBarcode With C#, VB.NET & F#

Curtis Chau
Curtis Chau
Updated: July 21, 2026

IronBarcode is built on .NET Standard 2.0, so it works natively with C#, VB.NET, and F# without additional configuration. The API surface is consistent across all three languages. Every method, class, and property available in C# is also accessible in VB.NET and F# projects.

Installation

Install IronBarcode from NuGet:

PM > Install-Package BarCode

The same BarCode package works for all three languages. No language-specific packages are required.

C# Example

C# is the most widely used language with IronBarcode. This example generates a QR code and saves it as a PNG:

using IronBarCode;

// Generate a QR code and save it as an image
var qrCode = QRCodeWriter.CreateQrCode("https://ironsoftware.com", 250);
qrCode.SaveAsPng("qr-code.png");

// Read the barcode back from the saved image
var result = BarcodeReader.Read("qr-code.png");
Console.WriteLine(result.First().Value);

Output

QR code encoding https://ironsoftware.com generated by IronBarcode in C#
Console output showing https://ironsoftware.com decoded from the generated QR code

QRCodeWriter.CreateQrCode produces a 250×250 QR code that BarcodeReader.Read decodes back to https://ironsoftware.com.

VB.NET Example

VB.NET uses the same IronBarcode methods as C#. Only the syntax changes:

Imports IronBarCode

' Generate a QR code and save it as an image
Dim qrCode = QRCodeWriter.CreateQrCode("https://ironsoftware.com", 250)
qrCode.SaveAsPng("qr-code.png")

' Read the barcode back from the saved image
Dim result = BarcodeReader.Read("qr-code.png")
Console.WriteLine(result.First().Value)
VB .NET

The output is identical to the C# example above.

VB.NET is supported across both .NET Framework and .NET Core projects. For a detailed walkthrough, see the VB.NET barcode generation tutorial.

F# Example

F# developers can reference IronBarcode directly. The library works in standard F# projects and in F# Interactive using the #r directive:

open IronBarCode

// Generate a QR code and save it as an image
let qrCode = QRCodeWriter.CreateQrCode("https://ironsoftware.com", 250)
qrCode.SaveAsPng("qr-code.png")

// Read the barcode back from the saved image
let result = BarcodeReader.Read("qr-code.png")
printfn "%s" (result.First().Value)
F#

The output is identical to the C# example above.

Supported .NET Versions

IronBarcode supports a wide range of .NET runtimes across all three languages:

  • .NET 10, 9, 8, 7, 6, 5
  • .NET Core 3.x, 2.x
  • .NET Framework 4.6.2+
  • .NET Standard 2.0

For platform-specific NuGet packages (Windows, Linux, macOS, iOS, Android), refer to the advanced installation guide.

Frequently Asked Questions

Is IronBarcode compatible with all .NET languages?

Yes, IronBarcode is fully compatible with C#, VB.NET, and F#. It provides a consistent API across these .NET languages without the need for additional configuration.

How do I install IronBarcode for use in a .NET project?

You can install IronBarcode via NuGet using the command: `Install-Package BarCode`. This package works across C#, VB.NET, and F#, so there are no language-specific packages needed.

Can IronBarcode generate and read QR codes using F#?

Absolutely, IronBarcode can generate and read QR codes in F#. You can use the `QRCodeWriter.CreateQrCode` and `BarcodeReader.Read` methods to perform these operations, similar to C# and VB.NET.

What .NET versions does IronBarcode support?

IronBarcode supports a wide range of .NET versions, including .NET 10 down to 5, .NET Core 3.x and 2.x, .NET Framework 4.6.2 and later, and .NET Standard 2.0.

Is there any difference in using IronBarcode between C# and VB.NET?

No, there is no difference in functionality when using IronBarcode between C# and VB.NET. The methods, classes, and properties are the same; only the syntax differs.

How do I save a generated QR code as an image in C# using IronBarcode?

In C#, you can save a generated QR code as an image by calling `qrCode.SaveAsPng("qr-code.png")` on the created QRCode object from the `QRCodeWriter.CreateQrCode` method.

Can IronBarcode be used with .NET Core projects?

Yes, IronBarcode can be used with .NET Core projects, supporting versions from .NET Core 2.x through .NET Core 3.x and beyond.

Is VB.NET supported for both .NET Framework and .NET Core with IronBarcode?

Yes, IronBarcode supports VB.NET for projects based on both .NET Framework and .NET Core.

What is the advantage of using IronBarcode across different .NET languages?

The advantage of using IronBarcode across different .NET languages is its consistent API, which allows developers to efficiently implement barcode functionality without having to learn different methods or classes for each language.

How do I confirm a QR code is read correctly using IronBarcode?

To confirm a QR code is read correctly using IronBarcode, you can use the `BarcodeReader.Read` method to decode the QR code and then compare the result against the expected value.

Curtis Chau
Technical Writer

Curtis Chau holds a Bachelor’s degree in Computer Science (Carleton University) and specializes in front-end development with expertise in Node.js, TypeScript, JavaScript, and React. Passionate about crafting intuitive and aesthetically pleasing user interfaces, Curtis enjoys working with modern frameworks and creating well-structured, visually appealing manuals.

...
Read More

Ready to Get Started?

Nuget Downloads 2,422,100Version:2026.9just released

Get your free 30-day Trial Key instantly.
No credit card or account creation required
C# NuGet Library for PDF
Install with NuGet

Version: 2026.9

PM > Install-Package BarCode
nuget.org/packages/BarCode/
  1. In Solution Explorer, right-click References, Manage NuGet Packages
  2. Select Browse and search "IronBarCode"
  3. Select the package and install
C# PDF DLL
Download DLL

Version: 2026.9

  1. Download and unzip IronBarCode to a location such as ~/Libs within your Solution directory
  2. In Visual Studio Solution Explorer, right click References. Select Browse, "IronBarCode.dll"

Licenses from $999

Key in blue circle

Get your free 30-day Trial Key instantly.

Your trial license will be sent to your email address

No limitations. 100% unlocked. No credit card.

bullet_checkedNo credit card or account creation requiredNo limitations. 100% unlocked. No credit card.
  • Logo Aetna
  • Logo NASA
  • Logo GE
  • Logo Porsche
  • Logo USDA
  • Logo Qatar
Join Millions of Engineers who’ve tried IronPDF
Book your free Live Demo
Booking Badge

Trusted by Millions of Engineers Worldwide

Iron Software's customer logos
Get Your No-Obligation Consult
Complete the form below or email sales@ironsoftware.com
Your details will always be kept confidential.
Trusted by Millions of Engineers Worldwide
Iron Software's customer logos
Get your free 30-day Trial Key instantly.
No credit card or account creation required