StreamWriter question

Does this line of code:

m_LogFile = New StreamWriter(m_LogFolder & m_LogFileName)

overwrite the file if the file already exists? If so, how would you open "to append" instead of overwriting?
lee88Asked:
Who is Participating?

Improve company productivity with a Business Account.Sign Up

x
 
joriszwaenepoelConnect With a Mentor Commented:
Add True as value for the second argument.

m_LogFile = New StreamWriter(m_LogFolder & m_LogFileName, True)

http://msdn.microsoft.com/en-us/library/36b035cb.aspx
0
 
John (Yiannis) ToutountzoglouInstructor Multiengine PilotCommented:
StreamWriter = New StreamWriter("myfile.txt") 'creates a new text file
StreamWriter = New StreamWriter("C:\append.txt", True) 'append lines of text to a file.
0
 
John (Yiannis) ToutountzoglouInstructor Multiengine PilotCommented:
Take a look here ...It is Very helpfull..
http://dotnetperls.com/streamwriter-vbnet
0
 
John (Yiannis) ToutountzoglouInstructor Multiengine PilotCommented:
@lee88 ..if there are several answers with multiple comments related to the question you can accept multiple solutions....
0
 
lee88Author Commented:
OK. Thanks for the help.
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.