我正在改编我在这里找到的一些代码:http://nicholas.piasecki.name/blog/2009/03/sending-raw-epl2-directly-to-a-zebra-lp2844-via-c/#comment-1636 , 但在 VS 2003/.NET 1.1 中,无法识别 StringBuilder 的 AppendLine 方法,因此我将其截断为 .Append。
我现在是否需要在每次调用 Append 后添加 #13#10 左右 - 我假设这是 AppendLine 自动执行的操作。
最佳答案
是的。
AppendLine()
将追加其参数,然后是 Environment.Newline
。
如果您不调用 AppendLine()
,您将需要自己包含换行符。
关于c# - 当我使用 StringBuilder.Append 而不是 .AppendLine 时,是否需要添加额外的 .Append(crlf)?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/14735292/