PC Review


Reply
Thread Tools Rate Thread

how can I format text using WriteAllText method?

 
 
=?Utf-8?B?am9obmFicmFoYW0xMDE=?=
Guest
Posts: n/a
 
      19th Feb 2007
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.
bye
 
Reply With Quote
 
 
 
 
Armin Zingler
Guest
Posts: n/a
 
      19th Feb 2007
"johnabraham101" <(E-Mail Removed)> schrieb
> 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. bye



See constants: vbCr, vbLf, vbCrLf, vbTab



Armin
 
Reply With Quote
 
Herfried K. Wagner [MVP]
Guest
Posts: n/a
 
      19th Feb 2007
"johnabraham101" <(E-Mail Removed)> schrieb:
> 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.


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/>

 
Reply With Quote
 
 
 
Reply

Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
My.Computer.FileSystem.WriteAllText and disposing kimiraikkonen Microsoft VB .NET 5 6th Jan 2008 12:54 PM
Bug in My.Computer.FileSystem.WriteAllText =?Utf-8?B?Qm8gTWNJbHZhaW4=?= Microsoft Dot NET Framework 3 17th Aug 2007 07:34 AM
WriteAllText Jim Microsoft VB .NET 1 18th Mar 2007 06:44 AM
ASP.NET 2: My.Computer.FileSystem.WriteAllText can write text file to any folder ? Tee Microsoft ASP .NET 7 9th Jul 2004 11:44 AM
SendObject Method format Font Color and Size for Message Text Jason Microsoft Access Form Coding 0 21st Jun 2004 07:43 PM


Features
 

Advertising
 

Newsgroups
 


All times are GMT +1. The time now is 04:21 PM.