Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Chriss Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Writing strings with stream

Status
Not open for further replies.

kristof

Programmer
Jun 2, 2000
234
BE
Hi all,

I'm using this to write a string to file:

Dim myFileStream As New FileStream(sFilename, FileMode.Open)
Dim swStreamWriter As New StreamWriter(myFileStream)
swStreamWriter.Write(script)
swStreamWriter.Close()
myFileStream.Close

This works fine, except that it adds " to the start and end of the string.
How can I avoid that?

Thanks
 
Where is it getting the "script" from. Can you show that code.

DotNetDoc
M.C.S.D.
---------------------------------------

Tell me and I forget. Show me and I remember. Involve me and I understand.
- Anonymous Chinese Proverb
-----------------------------------
If you can't explain it simply, you don't understand it well enough.
- A. Einstein
 
script = "vbc " & sShortFile & " /reference:System.dll,System.Windows.Forms.dll," & _
"System.Drawing.dll /target:winexe"

(Where sShortFile is a filename where its full path has been removed eg test.vb)
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top