BarCodeReader.Timeout property

Gets or sets the timeout of recognition process in milliseconds.

public int Timeout { get; set; }

Property Value

The timeout.


This sample shows how to avoid recogntion hungs with timeount on large images

using (BarCodeReader reader = new BarCodeReader(@"c:\test.png"))
    reader.Timeout = 5000;
    foreach (BarCodeResult result in reader.ReadBarCodes())
        Console.WriteLine("BarCode CodeText: " + result.CodeText);
Using reader As New BarCodeReader("c:\test.png")
    reader.Timeout = 5000
    For Each result As BarCodeResult In reader.ReadBarCodes()
        Console.WriteLine("BarCode CodeText: " + result.CodeText)
End Using

See Also