Is there a way to use a tab character like a new line character inside the Environment class, instead of using "\t"?
Is there a way to use a tab character like a new line character
Share
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
No.
The only reason that
Environment.NewLineexists at all is cross-platform issues, which the tab character doesn’t have.The newline character is
\ron (pre-OS X) Mac,\non Unix, and\r\non Windows.To allow .NET code to be portable across these platforms, the
Environment.NewLineproperty 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.