Timeout

BarCodeReader.Timeout property

获取或设置识别过程的超时时间,以毫秒为单位。

public int Timeout { get; set; }

适当的价值

超时。

例子

此示例显示如何避免在大图像上因超时而导致识别挂起

[C#]
using (BarCodeReader reader = new BarCodeReader(@"c:\test.png"))
{
    reader.Timeout = 5000;
    foreach (BarCodeResult result in reader.ReadBarCodes())
        Console.WriteLine("BarCode CodeText: " + result.CodeText);
}
[VB.NET]
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)
    Next
End Using

也可以看看