473,320 Members | 1,713 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,320 software developers and data experts.

Open a StreamReader on type File


Can I open a StreamReader on type File ( instead of a string filename ) ?

Jul 21 '05 #1
1 1016
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

"Bagger Vance" <hi****@fuji.mount.> wrote in message
news:1108688778.d2ef14884abe160ab22023c1fe96223f@t eranews...

Can I open a StreamReader on type File ( instead of a string filename ) ?

Jul 21 '05 #2

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

5
by: Andy Mee | last post by:
Hello one and all, I'm developing an Asp.NET system to take a CSV file uploaded via the web, parse it, and insert the values into an SQL database. My sticking point comes when I try to split()...
7
by: Hareth | last post by:
How do I open a file (such as .txt) in C#..... I tried: String File; File = txtMain.Text; dlgOpen.ShowDialog(); File = dlgOpen.FileName;
1
by: Bagger Vance | last post by:
Can I open a StreamReader on type File ( instead of a string filename ) ?
6
by: Jason Huang | last post by:
Hi, Using C# web form in ASP.Net, how to open a MS Word application? Thanks for help. Jason
3
by: Paul | last post by:
Hello, First I want to refer to the problem "WebRequest : execute a button" of a few days ago. The way I solved it, I loose my session, and as a consequence my session variables. I don't want...
8
by: Juan Manuel Alegría B. | last post by:
Hi group!!! I am new in the ASP.NET programming. I am trying to open a ..txt file but I can't do it. I am using: but i don't know if its the right way. Thanks for help me. Dim proc As New...
7
by: Lumpierbritches | last post by:
Thank you in advance for any and all assistance. It is greatly appreciated. I would like a command button in VB.Net 2002 to open a text file, then to allow text from a textbox on the current form...
1
by: jcrouse | last post by:
This is sort of a revisited item from about two months ago (don't get mad Cor) with additional code. I am creating a batch file called CreateMameGames.bat. I am then running that batch file to...
5
by: jkristia | last post by:
StreamReader throws an exception if I attempt to open a .csv file which is also opened by Excel. I checked this list and found what I though was the solution, first open the file stream in read...
0
by: DolphinDB | last post by:
Tired of spending countless mintues downsampling your data? Look no further! In this article, you’ll learn how to efficiently downsample 6.48 billion high-frequency records to 61 million...
0
by: ryjfgjl | last post by:
ExcelToDatabase: batch import excel into database automatically...
1
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
0
by: Vimpel783 | last post by:
Hello! Guys, I found this code on the Internet, but I need to modify it a little. It works well, the problem is this: Data is sent from only one cell, in this case B5, but it is necessary that data...
0
by: ArrayDB | last post by:
The error message I've encountered is; ERROR:root:Error generating model response: exception: access violation writing 0x0000000000005140, which seems to be indicative of an access violation...
1
by: PapaRatzi | last post by:
Hello, I am teaching myself MS Access forms design and Visual Basic. I've created a table to capture a list of Top 30 singles and forms to capture new entries. The final step is a form (unbound)...
1
by: Shællîpôpï 09 | last post by:
If u are using a keypad phone, how do u turn on JavaScript, to access features like WhatsApp, Facebook, Instagram....
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome former...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.