Tech
Forums
Jobs
Books
Events
Interviews
Live
More
Learn
Training
Career
Members
Videos
News
Blogs
Login
Sign Up
Ask Question
1
Reply
file not found exception
satyanand mishra
Jan 7 2018 9:07 AM
99
Reply
try
{
string fileName= @"C:\Users\tnhfcl\Desktop\satya.txt ";
StreamReader streamreader = new StreamReader(fileName);
Console.WriteLine( streamreader.ReadToEnd());
Console.ReadLine();
streamreader.Close();
}
catch (FileNotFoundException ex)
{
Console.WriteLine(ex.FileName);
Console.ReadLine();
}
Upload Source Code
Select only zip and rar file.
Post
Reset
Cancel
Answers (
1
)
Next Recommended Forum
Saving multiple images at once
Download files having special characters in filemame