|
-
Aug 17th, 2006, 09:24 PM
#1
Thread Starter
Hyperactive Member
[RESOLVED] [1.0/1.1] Appending tabs and line breaks to a text file.
Hi guys. I know how to create a text file and append text to that text file. But does anyone know how to insert tabs or newlines to a text file? I'm using the backslash character \ but it's still not recognizing it.
if (!File.Exists(@"test.txt"))
{
using (StreamWriter sw = File.CreateText(@"test.txt"))
{
sw.WriteLine("Start text\tHello\nhi\n");
}
}
I want this:
Start text Hello
hi
but i'm getting this: Start text\tHello\nhi\n
jennifer
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|