Solved

Need to readlines of a file stream

Posted on 2004-09-30
4
360 Views
Last Modified: 2008-01-09
I need to know how to easily store each line in the file i am opening into an array... Its easy to do using a StreamReader, is there a way to convert stream to streamreader???

openFileDialog1.InitialDirectory = "c:\\" ;
openFileDialog1.Filter = "MiPS files (*.mip)|*.mip|All files (*.*)|*.*" ;
openFileDialog1.FilterIndex = 2 ;
openFileDialog1.RestoreDirectory = true ;

if(openFileDialog1.ShowDialog() == DialogResult.OK)
{
if((myStream = openFileDialog1.OpenFile())!= null)
{
//get each line in the file and put in an array
}
0
Comment
Question by:Rowdyone52
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 2
4 Comments
 
LVL 14

Accepted Solution

by:
AvonWyss earned 500 total points
ID: 12192673
StreamReader sr=new StreamReader(myStream)
0
 

Author Comment

by:Rowdyone52
ID: 12192692
goodness... should figured that one out!  thanks.
0
 
LVL 22

Expert Comment

by:_TAD_
ID: 12192720

Avon, are you passing points?

;-P
0
 
LVL 14

Expert Comment

by:AvonWyss
ID: 12193130
Well, that was easy enough ;-)
0

Featured Post

On Demand Webinar: Networking for the Cloud Era

Did you know SD-WANs can improve network connectivity? Check out this webinar to learn how an SD-WAN simplified, one-click tool can help you migrate and manage data in the cloud.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Real-time is more about the business, not the technology. In day-to-day life, to make real-time decisions like buying or investing, business needs the latest information(e.g. Gold Rate/Stock Rate). Unlike traditional days, you need not wait for a fe…
Performance in games development is paramount: every microsecond counts to be able to do everything in less than 33ms (aiming at 16ms). C# foreach statement is one of the worst performance killers, and here I explain why.
In this video, viewers are given an introduction to using the Windows 10 Snipping Tool, how to quickly locate it when it's needed and also how make it always available with a single click of a mouse button, by pinning it to the Desktop Task Bar. Int…
Michael from AdRem Software explains how to view the most utilized and worst performing nodes in your network, by accessing the Top Charts view in NetCrunch network monitor (https://www.adremsoft.com/). Top Charts is a view in which you can set seve…

691 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question