Solved

Need to readlines of a file stream

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

Article by: Ivo
C# And Nullable Types Since 2.0 C# has Nullable(T) Generic Structure. The idea behind is to allow value type objects to have null values just like reference types have. This concerns scenarios where not all data sources have values (like a databa…
This article introduced a TextBox that supports transparent background.   Introduction TextBox is the most widely used control component in GUI design. Most GUI controls do not support transparent background and more or less do not have the…
I've attached the XLSM Excel spreadsheet I used in the video and also text files containing the macros used below. https://filedb.experts-exchange.com/incoming/2017/03_w12/1151775/Permutations.txt https://filedb.experts-exchange.com/incoming/201…
How to Install VMware Tools in Red Hat Enterprise Linux 6.4 (RHEL 6.4) Step-by-Step Tutorial

735 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