List<byte> list = new List<byte>(); networkStream = clientSocket.GetStream(); for (int p = 0; p >= 0; p++) { b = new byte[5000]; int k = networkStream.Read(b, 0, b.Length); for (int i = 0; i < k; i++) { Convert.ToChar(b[i]); } var j = b.Length - 1; while (b[j] == 0) { --j; } var temp = new byte[j + 1]; Array.Copy(b, temp, j + 1); string res = System.Text.Encoding.ASCII.GetString(temp); switch (res.Substring(0, 1)) { case "$": if (res.StartsWith("$")) //barcode string { //barcode// list.Add(res); if(res.Contains("*")) { string collection = string.Join("", list); } } else{} break; } } }
var
This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)