Solved

Need to readlines of a file stream

Posted on 2004-09-30
4
356 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

Free Tool: SSL Checker

Scans your site and returns information about your SSL implementation and certificate. Helpful for debugging and validating your SSL configuration.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
Name Space error VS2015 1 45
Change to file doesn't show up 16 93
pressing download button in c# 7 45
Which is best Image Resizing Web service 11 31
Article by: Najam
Having new technologies does not mean they will completely replace old components.  Recently I had to create WCF that will be called by VB6 component.  Here I will describe what steps one should follow while doing so, please feel free to post any qu…
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…
A short tutorial showing how to set up an email signature in Outlook on the Web (previously known as OWA). For free email signatures designs, visit https://www.mail-signatures.com/articles/signature-templates/?sts=6651 If you want to manage em…

738 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