?
Solved

Need to readlines of a file stream

Posted on 2004-09-30
4
Medium Priority
?
366 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 2000 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

This article is for Object-Oriented Programming (OOP) beginners. An Interface contains declarations of events, indexers, methods and/or properties. Any class which implements the Interface should provide the concrete implementation for each Inter…
Entity Framework is a powerful tool to help you interact with the DataBase but still doesn't help much when we have a Stored Procedure that returns more than one resultset. The solution takes some of out-of-the-box thinking; read on!
This is my first video review of Microsoft Bookings, I will be doing a part two with a bit more information, but wanted to get this out to you folks.
Sometimes it takes a new vantage point, apart from our everyday security practices, to truly see our Active Directory (AD) vulnerabilities. We get used to implementing the same techniques and checking the same areas for a breach. This pattern can re…

649 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