private bool start = false;
private const int F = 23, L = 35;
private int prepost = 0; string process(int value)
{
if (!start)
{
prepost = value;
start = true;
return null;
}
string ret = prepost.ToString(); if (value == L)
{
if (prepost==F) {
start = false;
return null;
}else
{
prepost = value;
}
}
else
{
prepost = value;
}
return ret;
}使用的时候 while(bytetoread>0)
{
int temp=com.readbyte();//读取一个数据
data.text+=process(temp.tostring());//显示
}
保存数据判断
或string[] arr=s.Split(new string{","});