VB.NET中的vbcrlf是什么意思?它在C#中的等效功能是什么? [英] What is meant by vbcrlf in VB.NET? And what is its equivalent in C#?

查看:610
本文介绍了VB.NET中的vbcrlf是什么意思?它在C#中的等效功能是什么?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

VB.NET中的vbcrlf是什么意思?在C#中它等效什么?

What is meant by vbcrlf in VB.NET? And what is its equivalent in C#?

推荐答案

^ ]是硬编码的回车符(CR,将光标移到当前行的左边缘),换行符(LF,将光标下移一个行,通常留在同一列中.

通常,您不应使用它们,因为它们不一定可移植到其他系统:使用 ^ ].

vbCrLf在Microsoft.VisualBasic命名空间的C#中(如果包含对Microsoft.VisualBasic.dll的引用)可用.我个人会改用"\ r \ n"或按喜好使用Environment.NewLine.
vbCrLf[^] is a hard coded Carriage Return (CR, moves the cursor to the left hand edge of the current line) and a Line Feed (LF, moves the cursor down one line, normally staying in the same column).

Generally, you shouldn''t use them as they aren''t necessarily portable to other systems: use Environment.NewLine[^] instead.

vbCrLf is available in C# (if you include a reference to the Microsoft.VisualBasic.dll) in the Microsoft.VisualBasic namespace. I personally would use "\r\n" instead, or Environment.NewLine by preference.


这篇关于VB.NET中的vbcrlf是什么意思?它在C#中的等效功能是什么?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆