Aspose::BarCode::BarCodeRecognition::OneDExtendedParameters class

OneDExtendedParameters class

Stores special data of 1D recognized barcode like separate codetext and checksum.

class OneDExtendedParameters : public Aspose::BarCode::BarCodeRecognition::BaseExtendedParameters

Methods

MethodDescription
get_CheckSum()Gets the checksum for 1D barcodes.
get_IsEmpty()Tests whether all parameters has only default values.
get_Value()Gets the codetext of 1D barcodes without checksum.
GetHashCode() const overrideReturns the hash code for this instance.
ToString() const overrideReturns a human-readable string representation of this OneDExtendedParameters.

Remarks

This sample shows how to get 1D barcode value and checksum

[C#]
using (BarcodeGenerator generator = new BarcodeGenerator(EncodeTypes.EAN13, "1234567890128"))
{
    generator.Save(@"c:\test.png");
}
using (BarCodeReader reader = new BarCodeReader(@"c:\test.png", DecodeType.EAN13))
{
    foreach (BarCodeResult result in reader.ReadBarCodes())
    {
        Console.WriteLine("BarCode Type: " + result.CodeTypeName);
        Console.WriteLine("BarCode CodeText: " + result.CodeText);
        Console.WriteLine("BarCode Value: " + result.Extended.OneD.Value);
        Console.WriteLine("BarCode Checksum: " + result.Extended.OneD.CheckSum);
    }
}
[VB.NET]
Using generator As New BarcodeGenerator(EncodeTypes.EAN13, "1234567890128")
    generator.Save("c:\test.png")
End Using
Using reader As New BarCodeReader("c:\test.png", DecodeType.EAN13)
    For Each result As BarCodeResult In reader.ReadBarCodes()
        Console.WriteLine("BarCode Type: " + result.CodeTypeName)
        Console.WriteLine("BarCode CodeText: " + result.CodeText)
        Console.WriteLine("BarCode Value: " + result.Extended.OneD.Value)
        Console.WriteLine("BarCode Checksum: " + result.Extended.OneD.CheckSum)
    Next
End Using

See Also