tab char in a string...

  • Thread starter Thread starter Chuck Bowling
  • Start date Start date
C

Chuck Bowling

how do i get a tab char into a string? i tried this and it didn't work...


t.Question = "this is the \t\t\t first line" +
Environment.NewLine + "the \r\n second broken line";
 
Chuck,

\t is the correct escape sequence for a tab.

What do you mean by, "it didn't work"? How did you display the string?

--Bob
 
all i did to display was dump the string into a label i.e.

lblQuestion.Text = t.Question;

there were no tabs apparent in the display.
 
As far as I know, the label contol doesn't display the tab character. Try a
different control, or examine the value of the variable w/ the debugger while
the program is running.
 
ah... thanks Julie..

Julie said:
As far as I know, the label contol doesn't display the tab character. Try a
different control, or examine the value of the variable w/ the debugger while
the program is running.
 
Back
Top