View Single Post
  #4 (permalink)  
Old 06-18-2008, 04:02 PM
Xav's Avatar   
Xav Xav is offline
Code Slinger
 
Join Date: Mar 2008
Location: The North Pole
Posts: 11,010
Last Blog:
Web slideshow in JavaS...
Credits: 1
Rep Power: 86
Xav has much to be proud ofXav has much to be proud ofXav has much to be proud ofXav has much to be proud ofXav has much to be proud ofXav has much to be proud ofXav has much to be proud ofXav has much to be proud of
Send a message via MSN to Xav
Default Re: Visual Studio 2008: C# Reading Files

Is this in response to my writing files tutorials?

I must say, I would never use the StreamReader object without exception handling - while the StreamWriter simply creates a new file or overwrites as necessary, the StreamReader simply throws exceptions.

Also, the same function can be achieved simply by using IO.File.ReadAllText(), a static method that alleviates the need for any extra objects.
__________________


Mr. Xav | Website | Forums | Blog
Reply With Quote