Which namespace do we use to work with StreamReader class?

 Posted by vishalneeraj-24503 on 1/27/2014 | Category: C# Interview questions | Views: 986 | Points: 40
Answer:

We have to import System.IO namespace to work with StreamReader class.

Actually System.IO namespace is used to work with File handling operations like reading files and writing into files.
It contain types that support input and output.
The System.IO namespace has various classes that are used for performing various operation with files such as creating and deleting files,reading from or writing to a file,closing a file.

In short,whenever we want to work with files,then we have to use System.IO namespace.


Asked In: Many Interviews | Alert Moderator 

Comments or Responses

Login to post response