NewLine-帮助... [英] NewLine - Help plz...
问题描述
你好.
我正在尝试开发使用串行连接的应用程序
设备.我设法创建了一个可以发送和接收的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 connected
device. I' ve managed to create a UI that sends and receives
data. Almost everything is working fine with the serial port object. My
problem is that the serial port object sends one extra line feed, which
terminates any receive of data of some commands.
I would like to know how can I use the NewLine() property, so as to
change the termination character. I've tried to write something
like 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
推荐答案
尝试Environment.NewLine
Try Environment.NewLine
我希望这可以正常工作.
I hope this will work fine.
最好的问候,
Rizwan aka RizwanSharp
Rizwan aka RizwanSharp
这篇关于NewLine-帮助...的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!