Originally Posted by Shaggy Hiker
Since it's a serial port, why not just use Read, and pass in the byte array as an argument. That would skip a semi-costly encoding and decoding step.
However, if you want to do it that way, have you looked at strResult to confirm that it is ok at that point?
I have used that function without any problem before, and nothing you have looks incorrect to me, so I would be curious to know whether the string looked right.
One other thing I might mention, though it shouldn't matter. I haven't used that function in over a year, but I don't recall making the object. I think I did something along the lines of:
baRet = system.text.asciiencoding.encoding.GetBytes(strResult)
though I would have to go back and review an old program to be certain.