Aspose.BarCode  for .NET
Standard 2 of 5

Read Standard 2 of 5 Barcodes with .NET

Read Standard 2 of 5 (Industrial 2 of 5) barcode in C# using server-side Aspose.BarCode for .NET API

How to Read Standard 2 of 5 barcode Using .NET

To decode Standard 2 of 5 barcode, try Aspose.BarCode for .NET API, a feature-rich, powerful, and easy-to-use barcode library for C# platforms. Usen NuGet and search for Aspose.BarCode to install the package. Alternatively, run the following command from the Package Manager console:


  PM> Install-Package Aspose.BarCode

Steps for Scanning Standard 2 of 5 barcode in C#

Aspose.BarCode allows developers to read Standard 2 of 5 barcode barcodes from stream or image with few lines of code

  • Create a new instance of Aspose.BarCode.BarCodeReader class
  • Pass the source image path containing Standard 2 of 5 barcode as a parameter
  • Pass an appropriate DecodeType as the second parameter
  • Loop through the decoding results
  • Get barcode text using the CodeText property

System Requirements

Aspose APIs are supported on all major platforms and operating systems. Before executing the code sample below, please make sure that your system comply with the following requirements.

  • Microsoft Windows, Linux, or any OS compatible with .NET Framework, .NET Standard, COM Interloop for PHP, VBScript, Delphi, or C++
  • Development environment, such as Microsoft Visual Studio.
  • Aspose.BarCode for .NET library DLL referenced in your project - Install from NuGet using the Download button
Ready to recognize Recognizing Drop a file here or click to browse *

* By uploading your files or using the service you agree with our Terms of use and Privacy Policy.

Code to be executed - C#

// Initialize barcode reader
using (var reader = new Aspose.BarCode.BarCodeReader("<file name>", DecodeType.Standard2of5))
    // Recognize barcodes on the image
    foreach (var barcode in reader.ReadBarCodes())
        // Display the recognition result
        Console.WriteLine($"{barcode.CodeTypeName}: {barcode.CodeText}");

Recognition result