27 Apr 2009 @ 3:17 PM 
 

C# - How to read a text file

 


1 Star2 Stars3 Stars4 Stars5 Stars (1 votes, average: 5 out of 5)
Loading ... Loading ...
438 views
C#:
  1. using (StreamReader re = File.OpenText("engineeringserver.txt"))
  2. {
  3. string input = null;
  4. while ((input = re.ReadLine()) != null)
  5. {
  6. Console.WriteLine(input);
  7. }
  8. }

This code snippet has been sponsored by FruitfulTime. Try out FruitfulTime ProductivityMeter Business Editiona employee monitoring software

Related posts

Your Ad Here
Tags Tags:
Categories: .Net
Posted By: gaetano
Last Edit: 25 Apr 2009 @ 03 20 PM

EmailPermalink
 

Responses to this post » (None)

 

Post a Comment

You must be logged in to post a comment.

\/ More Options ...
Change Theme...
  • Users » 888
  • Posts/Pages » 1,444
  • Comments » 506
Change Theme...
  • VoidVoid « Default
  • LifeLife
  • EarthEarth
  • WindWind
  • WaterWater
  • FireFire
  • LightLight

Online Users



    No Child Pages.

Forum



    No Child Pages.