Vidyalelo
C# Programming · Q26

File Handling and Input Output in C Sharp

Programming · C# Programming · question 26

Q26

In C#, what happens if you attempt to read from a file that does not exist using File.OpenRead() method?

A.
FileNotFoundException is thrown
Answer
B.
DirectoryNotFoundException is thrown
C.
FileLoadException is thrown
D.
IOException is thrown

Answer: Option A

Solution

Answer: Option A
No explanation is given for this question Let's Discuss on Board