C# Stream reader problem
hi all
i am doing some job in c# using stream reader
i am using
streamreader file=new streamreader("c:/test.txt")
but i m getting 'Could not find file exception'
while file is exist there.........
Windows Forum
hi all
i am doing some job in c# using stream reader
i am using
streamreader file=new streamreader("c:/test.txt")
but i m getting 'Could not find file exception'
while file is exist there.........
by saurabh_bhadauria Accepted solution
by ed woychowsky Accepted solution
Isn't it FileStream, not StreamReader. Here's an example: http://www.java2s.com/Tutorial/CSharp/0300__File-Directory-Stream/AFileReader.htm
Hope this helps.
by tony hopkinson Accepted solution
You'd be better off loading your file in to a FileSttream inside a using clause, to make sure the resources get dropped properly.
This should help
http://www.dotnetspider.com/namespace/ShowClass.aspx?ClassId=47
Mind you this person like you is putting stuff in C:\, so like you they are going to have some potential problems if they run their code on Vista...
This discussion is closed to new replies.
Sort by Trending