Hi,
I got struggled,In below i have mentioned detaily
void _SerialPort_DataReceived(object sender, SerialDataReceivedEventArgs e)
{
sbSPBuffer.Append(_SerialPort.ReadExisting().ToString());
if (sbSPBuffer.ToString().IndexOf(Global.LHScannerPrefix.Trim()) != -1)
{
}
}
Global.LHScannerPrefix="\r\n";
GLobal.LHScannerPrefix
is configured as enter key,It will vary depends upon scanner, sometimes it may be tab key(\t);
I have configured my serial Port scanner with suffix as enter key, So whenever i scan any barcode ,it will comes scanned data along with enter key(\r\n);
After that I will Remove the enter key ,then i do my opeations.
When i try to find the Index (
GLobal.LHScannerPrefix
) from scanned barcode ,its not find the mentioned value fom string. When i check the value in
GLobal.LHScannerPrefix
it is having
"\\r\\n"
How can i achieve it.