473,387 Members | 1,942 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,387 software developers and data experts.

Open a StreamReader on type File


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

Nov 16 '05 #1
1 1245
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 ) ?

Nov 16 '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()...
1
by: Bagger Vance | last post by:
Can I open a StreamReader on type File ( instead of a string filename ) ?
2
by: Marge Inoferror | last post by:
Visual C#... I'd like to save some settings that are in integers and then save some lists of file names. I'm just starting off (as you can tell - no doubt.). I'm starting by trying to save...
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;
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: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...

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.