问题描述
你好.
我正在尝试开发使用串行连接的应用程序设备.我设法创建了一个可以发送和接收的UI数据.串行对象几乎可以正常工作.我的问题是串行端口对象发送了一个额外的换行符,终止某些命令的数据接收.
我想知道如何使用NewLine()属性,以便更改终止符.我试着写点东西类似于以下内容:
port.NewLine ="\ n"; ,port.NewLine ="null",port.NewLine ="\ r",port.NewLine ="13"
但上述方法均无效.
非常感谢您的帮助.提前谢谢...
NM
Hi there.
I am trying to develop an application that uses a serial connecteddevice. I' ve managed to create a UI that sends and receivesdata. Almost everything is working fine with the serial port object. Myproblem is that the serial port object sends one extra line feed, whichterminates any receive of data of some commands.
I would like to know how can I use the NewLine() property, so as tochange the termination character. I've tried to write somethinglike the following:
port.NewLine = "\n" , port.NewLine = "null", port.NewLine = "\r", port.NewLine = "13"
but none of the aforementioned ways worked.
I would really appreciate any help of you. Thank you in advance...
NM
推荐答案
我希望这可以正常工作.
I hope this will work fine.
最好的问候,
Rizwan aka RizwanSharp
Rizwan aka RizwanSharp
这篇关于NewLine-帮助...的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!