Problem with serial port data receive in C#

前端 未结 6 1986
梦谈多话
梦谈多话 2021-01-15 21:40

I have a problem with a C# program. Through the Serial port i Receive a large string about 110 characters. This part works ok, but when i add code to split the string up i r

6条回答
  •  生来不讨喜
    2021-01-15 22:09

    The length of "data" is probably too short for one of the calls to "Substring". Check the length of the string that you expect before accessing parts of it that may not exist.

提交回复
热议问题