VB.NET 中的分号制表位
在 VB6 中,有一个函数可以将打印位置移动到下一个制表位,如下所示:
Print #1, "Total run time: "; _
Fix(tmpTick / 60000) & " min and " _
& Fix((Abs((tmpTick / 60000) - Fix(tmpTick / 60000)) _
* 60)) & " Sec"
我已将这个 VB6 重写为 VB.NET,但分号仍然完好无损:
mainoutputwriter.WriteLine("Total run time: "; _
Fix(tmpTick / 60000) & " min and " _
& Fix((Abs((tmpTick / 60000) - Fix(tmpTick / 60000)) _
* 60)) & " Sec")
我用什么替换分号来移动打印位置?
谢谢
In VB6, there was a function that moves the print position along to the next tabstop, like so:
Print #1, "Total run time: "; _
Fix(tmpTick / 60000) & " min and " _
& Fix((Abs((tmpTick / 60000) - Fix(tmpTick / 60000)) _
* 60)) & " Sec"
I have rewritten this VB6 into VB.NET, but with the semicolon still intact:
mainoutputwriter.WriteLine("Total run time: "; _
Fix(tmpTick / 60000) & " min and " _
& Fix((Abs((tmpTick / 60000) - Fix(tmpTick / 60000)) _
* 60)) & " Sec")
What do I replace the semicolon with to move the print position?
Thanks
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
ControlChars 类可能就是您想要使用的。
尝试用
ControlChars.Tab
替换分号。The ControlChars class is probably what you want to use.
Try replacing the semicolon with
ControlChars.Tab
.