BarcodeDataAsByte Property
Gets the recognized barcode data value in bytes.
public byte[] BarcodeDataAsByte {get;}
public: __property byte[]* get_BarcodeDataAsByte();
'Declaration
Public ReadOnly Property BarcodeDataAsByte As Byte()
'Usage
Dim instance As Result
Dim value() As Byte
value = instance.BarcodeDataAsByte
Property Value
The byte value.
using Accusoft.BarcodeXpressSdk;
// call Analyze to detect barcodes in the image
// all detected barcodes will be returned to the
// Result object array.
Result[] results = bcXpress.reader.Analyze(hDib);
// get some results info, if any
for (int i = 0; i < results.Length; i++)
{
// get result for current barcode
Result curResult = (Result)results.GetValue(i);
// UTF8 encoded data
Console.WriteLine("Value=" + Encoding.UTF8.GetString(curResult.BarcodeDataAsByte) + "\r");
// Japanese data
System.Text.Encoding encJapanese = System.Text.Encoding.GetEncoding(932); // Code page for Japanese (Shift-JIS)
Console.WriteLine("Value=" + System.Text.UnicodeEncoding.Unicode.GetString(System.Text.Encoding.Convert(encJapanese, System.Text.UnicodeEncoding.Unicode, curResult.BarcodeDataAsByte)));
}