char[] buffer = new char[100]; // buffer[0] =(char)a; int iIndex = 0; int oBuffer=1000; int ioLength = 64;
mp.Class1.CH375ReadData(iIndex,ref oBuffer,ref ioLength);
textBox1.Text = Convert.ToString(buffer[0], 10);
textBox2.Text = Convert.ToString(buffer[1], 10);
textBox3.Text = Convert.ToString(ioLength, 10); 上述代码是下位机向上位机返回数据的操作,我现向上位机发送2个字节长度的数据,测试后ioLength=2这个值是对的,可是textbox里却不能显示我发送的数据?这是什么原因,是缓冲区的错误吗?(textBox里显示0)