Want to win a PS4? Go Premium and enter to win our High-Tech Treats giveaway. Enter to Win

x
?
Solved

StreamWriter question

Posted on 2010-09-18
5
Medium Priority
?
395 Views
Last Modified: 2012-05-10
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?
0
Comment
Question by:lee88
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 3
5 Comments
 
LVL 10

Accepted Solution

by:
joriszwaenepoel earned 2000 total points
ID: 33709241
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
 
LVL 18

Expert Comment

by:John (Yiannis) Toutountzoglou
ID: 33709245
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
 
LVL 18

Expert Comment

by:John (Yiannis) Toutountzoglou
ID: 33709296
Take a look here ...It is Very helpfull..
http://dotnetperls.com/streamwriter-vbnet
0
 
LVL 18

Expert Comment

by:John (Yiannis) Toutountzoglou
ID: 33709325
@lee88 ..if there are several answers with multiple comments related to the question you can accept multiple solutions....
0
 

Author Comment

by:lee88
ID: 33709339
OK. Thanks for the help.
0

Featured Post

What’s Wrong with Your Cloud Strategy ?

Even as many CIOs are embracing a cloud-first strategy, the reality is that moving to the cloud is a lengthy process and the end-state is likely to be a blend of multiple clouds—public and private. Learn why multicloud solutions matter in this webinar by Nimble Storage.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Article by: Kraeven
Introduction Remote Share is a simple remote sharing tool, enabling you to see, add and remove remote or local shares. The application is written in VB.NET targeting the .NET framework 2.0. The source code and the compiled programs have been in…
Introduction As chip makers focus on adding processor cores over increasing clock speed, developers need to utilize the features of modern CPUs.  One of the ways we can do this is by implementing parallel algorithms in our software.   One recent…
How to fix incompatible JVM issue while installing Eclipse While installing Eclipse in windows, got one error like above and unable to proceed with the installation. This video describes how to successfully install Eclipse. How to solve incompa…
Please read the paragraph below before following the instructions in the video — there are important caveats in the paragraph that I did not mention in the video. If your PaperPort 12 or PaperPort 14 is failing to start, or crashing, or hanging, …

636 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question