如何发送十六进制呢?
如:3F 4E如何处理,接收回来的十六进制数呢?

解决方案 »

  1.   

    这个和16进制没有关系。
    你只要发送 3F的十进制整数,就可以了。
    3F 4E 是63 78,只要发送这两个整数就行了。
      

  2.   

    byte[] bytes = new byte[2] { 0x3F, 0x4E}楼上的是这样吧?
      

  3.   

    byte[] buffer=new byte[50];
    buffer[0]=0x3F;
    buffer[1]=0x4E;
    .
    .
    .把buffer这个数组发送出去就可以了
      

  4.   

    打开串口判断是否打开
    if(com.IsOpen){byte[] bytes = new byte[2] { 0x3F, 0x4E }
    com.Write(bytes, 0, bytes.Length);}接收部分
                    int iReadBytes=com.BytesToRead;
                    if (iReadBytes != 0)
                    {
                        byte[] rBytes = new byte[iReadBytes];
                        com.Read(rBytes, 0, iReadBytes);                }
      

  5.   


    例如:
    int var=int.Parse( "123456789abcdef ",NumberStyles.AllowHexSpecifier);
      

  6.   

    sorry  LZ这个是把16进制转换成数字Convert.ToString(接受到的数字, 16);//这个才是转换成16进制
      

  7.   

    http://blog.csdn.net/wuyazhe/article/details/5598945