Jump to content


Check out our Community Blogs

Register and join over 40,000 other developers!


Recent Status Updates

View All Updates

Photo
- - - - -

C# Tutorial: Writing Text Files

streamwriter

  • Please log in to reply
37 replies to this topic

#37 Locomotive

Locomotive

    CC Lurker

  • Just Joined
  • Pip
  • 2 posts
  • Programming Language:Java, C#, (Visual) Basic, Visual Basic .NET
  • Learning:Java, C#, Python, Visual Basic .NET

Posted 10 January 2013 - 10:33 PM

nice one!
  • 0

#38 CoolCoder

CoolCoder

    CC Lurker

  • Just Joined
  • Pip
  • 1 posts
  • Programming Language:C, C++, C#
  • Learning:C, C++, C#

Posted 08 February 2013 - 03:50 AM

You only need to change one line with respect to memory.

Replace this:

StreamWriter sw = new StreamWriter(path)

 

using(StreamWriter sw = new StreamWriter(path))


  • 0





Also tagged with one or more of these keywords: streamwriter

Recommended from our users: Dynamic Network Monitoring from WhatsUp Gold from IPSwitch. Free Download