473,321 Members | 1,669 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,321 software developers and data experts.

how can I format text using WriteAllText method?

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
Feb 19 '07 #1
2 3972
"johnabraham101" <jo************@discussions.microsoft.comschrieb
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
Feb 19 '07 #2
"johnabraham101" <jo************@discussions.microsoft.comschrieb :
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/>

Feb 19 '07 #3

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

6
by: Danny Lesandrini | last post by:
I'm using an Access database to drive a web site and the colors of various table backgrounds are stored in Access. I want users of the Access database to be able to select colors for the site, but...
8
by: John | last post by:
Hi I am trying to set-up an app log file that needs to be created if does not exists but opened for append if exists. How does one go about doing this? ..net seems to have many ways to do io...
8
by: Lucky | last post by:
hi guys! back again with another query. the problem is like this. i want to print a line like this: "---------------------------------------------" the easiest way is to simply assign it to...
3
by: =?Utf-8?B?am9obmFicmFoYW0xMDE=?= | last post by:
hello all, I've already posted a thread with the same problem but couldn't satisfactory answer. Let's come to the point. I can write some text to a text file with WriteAllText method. How can I...
7
by: peraklo | last post by:
Hello, there is another problem i am facing. i have a text file which is about 15000 lines big. i have to cut the last 27 lines from that file and create a new text file that contans those 27...
1
by: Jim | last post by:
..net newbie I'm trying to read using TextFieldParser because my input file needs to be parsed. Works fine. I can display the data in a msg box. Now I want to write that data to a text file...
4
by: ad | last post by:
How can I save a string as a text file to disk?
6
by: kimiraikkonen | last post by:
Hi, I want to save all the item content of a listbox line by line into a simple text file then recall them when my project is opened. For example listbox1 contains: That - item1 Group ...
6
by: kimiraikkonen | last post by:
Hi, I can read from a text file and insert text file's contents into a listbox whose format is line by line using this code: Dim reader As String reader = My.Computer.FileSystem.ReadAllText("c:...
0
by: ryjfgjl | last post by:
ExcelToDatabase: batch import excel into database automatically...
0
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
0
by: jfyes | last post by:
As a hardware engineer, after seeing that CEIWEI recently released a new tool for Modbus RTU Over TCP/UDP filtering and monitoring, I actively went to its official website to take a look. It turned...
0
by: ArrayDB | last post by:
The error message I've encountered is; ERROR:root:Error generating model response: exception: access violation writing 0x0000000000005140, which seems to be indicative of an access violation...
1
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
1
by: Defcon1945 | last post by:
I'm trying to learn Python using Pycharm but import shutil doesn't work
0
by: af34tf | last post by:
Hi Guys, I have a domain whose name is BytesLimited.com, and I want to sell it. Does anyone know about platforms that allow me to list my domain in auction for free. Thank you
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome former...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.