I’m trying to insert a tabSpace into a string:
string ab = "a" + "\t" + "b"
But I got a square instead of space.
Please help.
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.
Your code is correct.
Note that there is no need to use string concatenation. This achieves the same effect:
The problem you have is not with creating the string, but with displaying the string. You are probably using a control that doesn’t support displaying tabs. It might be better to replace the tabs with spaces.
Related