Page Rank

Subscribe

Categories

Recent posts

Alexa Rank

Read text file and write text file in C#


  • This topic explains about how to read text file and write text file in C# programming.
  • This is done with the help of stream reader and stream writer.
  • Tools needed: TextBox1 (TextBox1), Button1 (Button1), Button2 (Button2)

System.IO NamespaceRead text file and write text file in C#

  • The System.IO namespace contains types that allow read text file and write text file and data streams and types that provide basic file and directory support.

StreamReader ClassRead text file and write text file in C#

  • Implements a TextReader that reads characters from a byte stream in a particular encoding.
  • Syntax for StreamReader Class

StreamWriter ClassRead text file and write text file in C#


  • Implement a TextWriter for writing characters to a stream in a particular encoding.
  • Syntax for StreamWriter Class

StreamReader.ReadToEnd MethodRead text file and write text file in C#

  • Help to reads all characters from the current position to the end of the stream.

Read text file and write text file in C#Complete Code

Read text file and write text file in VB - Final result

Read text file and write text file in C# – Final result

Read text file and write text file in C#

 

VN:F [1.9.22_1171]
Rating: 0.0/10 (0 votes cast)
VN:F [1.9.22_1171]
Rating: 0 (from 0 votes)

Leave a Reply

  

  

  

You can use these HTML tags

<a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code class="" title="" data-url=""> <del datetime=""> <em> <i> <q cite=""> <strike> <strong> <pre class="" title="" data-url=""> <span class="" title="" data-url="">