Question

Is there an equivalant to Environment.NewLine in DotNet for a Tab character?

Was it helpful?

Solution

NewLine is on the Environment class because the new line specification varies between platforms:

It's "\r\n" for non-Unix platforms and "\n" for Unix platforms. However tab is always "\t".

OTHER TIPS

Short answer is: no, tab does not change between platforms as newline might, so there is no need for one.

Long answer is: technically, yes, you could use the one provided by VB in the Microsoft.VisualBasic.dll. I think it's Microsoft.VisualBasic.Constants.vbTab, but there's no good reason to use it in C# as I said above.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top