all groups > vb.net > february 2007 >
You're in the

vb.net

group:

how can I format text using WriteAllText method?


how can I format text using WriteAllText method? johnabraham101
2/18/2007 11:59:05 PM
vb.net: hello,
I'm trying to write a some text to a text file using WriteAllText method.
This method works fine but I don't understand how can I use format specifiers
to format the text as we use in C i.e "\n" for newline, "\t" for tab,...etc.
Re: how can I format text using WriteAllText method? Armin Zingler
2/19/2007 12:00:00 AM
"johnabraham101" <johnabraham101@discussions.microsoft.com> schrieb
[quoted text, click to view]


See constants: vbCr, vbLf, vbCrLf, vbTab



Re: how can I format text using WriteAllText method? Herfried K. Wagner [MVP]
2/19/2007 4:31:14 PM
"johnabraham101" <johnabraham101@discussions.microsoft.com> schrieb:
[quoted text, click to view]

s = _
"Hello" & ControlChars.Tab & "World" & ControlChars.NewLine _
"Second Line"
///

Note that the compiler will emit a single string literal to the assembly's
IL. No concatenation needs to be performed at runtime if all parts are
constant.

--
M S Herfried K. Wagner
M V P <URL:http://dotnet.mvps.org/>
V B <URL:http://dotnet.mvps.org/dotnet/faqs/>
AddThis Social Bookmark Button