以编程方式在.NET中使用制表符? [英] Programmatically using tab character in .NET?

查看:134
本文介绍了以编程方式在.NET中使用制表符?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

有没有办法来使用,而不是使用制表符般的环境类中的新行字符,\ t的

Is there a way to use a tab character like a new line character inside Environment class, instead of using "\t"?

推荐答案

没有。

这是 Environment.NewLine 在所有存在的唯一理由是跨平台的问题,这对制表符所没有的。
换行字符是 \ r 上(pre-OS X)的Mac,在UNIX上,和 \ r \ñ在Windows上。
为了使净code是在这些平台之间移植时, Environment.NewLine 财产被创建,返回所使用的平台,你的$换行字符(S) C $ C上的。

The only reason that Environment.NewLine exists at all is cross-platform issues, which the tab character doesn't have.
The newline character is \r on (Pre-OS X) Mac, \n on UNIX, and \r\n on Windows.
To allow .Net code to be portable across these platforms, the Environment.NewLine property was created, to return the newline character(s) used by the platform your code is running on.

制表符在所有平台上的标准,所以没有点在作出财产归还。

The tab character is standard across all platforms, so there's no point in making a property to return it.

这篇关于以编程方式在.NET中使用制表符?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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