/ Published in: C#
This is how I read a file using C#.
Expand |
Embed | Plain Text
Comments
Subscribe to comments
You need to login to post a comment.
stewshack on 05/16/09
7 people have marked this snippet as a favorite
rtipton
SnipItPrpDemo
LeeRJohnson
umang_nine
vali29
rageit
khouser
This is how I read a file using C#.
Subscribe to comments
You need to login to post a comment.
// my version of reading a file:
using ( StreamReader PrincessLeia = new StreamReader( DeathStarPlans ) ) { string R2D2 = PrincessLeia.ReadToEnd(); }
That works too, but I like to Peek just in case I need to do something for each line. Thanks for the feedback.