Open a StreamReader on type File

  • Thread starter Thread starter Bagger Vance
  • Start date Start date
B

Bagger Vance

Can I open a StreamReader on type File ( instead of a string filename ) ?
 
The File class contains only static members, you can't create instances of
it.
May be you mean FileStream, in this case the answer is yes, since
StreamReader has a constructor that takes Stream as a parameter, and
FileStream inherits from Stream.

Best regards,
Sherif
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top