Click here to Skip to main content
15,910,234 members
Home / Discussions / C#
   

C#

 
GeneralExract Data from LParam Pin
einish27-Jun-05 0:13
einish27-Jun-05 0:13 
GeneralRe: Exract Data from LParam Pin
Dave Kreskowiak27-Jun-05 9:31
mveDave Kreskowiak27-Jun-05 9:31 
Generaltreeviews... Pin
deep726-Jun-05 23:35
deep726-Jun-05 23:35 
GeneralRe: treeviews... Pin
S. Senthil Kumar26-Jun-05 23:50
S. Senthil Kumar26-Jun-05 23:50 
GeneralRe: treeviews... Pin
deep727-Jun-05 1:51
deep727-Jun-05 1:51 
GeneralRe: treeviews... Pin
deep727-Jun-05 1:54
deep727-Jun-05 1:54 
GeneralMessage Queue Pin
Roger Alsing26-Jun-05 23:23
Roger Alsing26-Jun-05 23:23 
GeneralReading Text file Pin
LiamD26-Jun-05 23:17
LiamD26-Jun-05 23:17 
I am still trying to get to grips with all the possibilities in C#. I am look for suggestion for the best way to implement the following.

I have a text file in Comma Separated Value (CSV) with 7 columns of double values. On a load of the form I want to be able to read these values to be displayed some time later.

My thinking is to store the data values in a 2 dimensional array. I have to know the number of fields to declare the array.

I do not know the number of lines in the file - so I can't create the 2-dim array up front. So do I read the file to determine the number of lines then create the array? Then re-read to assign the values to the array. By the way I am using

TextReader tr = new StreamReader(Filename);

Alternatively, I did see the ArrayList type. I could just add to this list without having to define ot up front. I did not like this as it did not seem to be typed - I want to use doubles.

What would be the best way to go? Should I use some other C# method?

Ta,
Liam
GeneralRe: Reading Text file Pin
mav.northwind26-Jun-05 23:34
mav.northwind26-Jun-05 23:34 
GeneralRe: Reading Text file Pin
LiamD27-Jun-05 2:05
LiamD27-Jun-05 2:05 
GeneralRe: Reading Text file Pin
mav.northwind27-Jun-05 2:33
mav.northwind27-Jun-05 2:33 
GeneralRe: Reading Text file Pin
Anthony Baraff27-Jun-05 7:37
Anthony Baraff27-Jun-05 7:37 
GeneralRe: Reading Text file Pin
LiamD27-Jun-05 21:19
LiamD27-Jun-05 21:19 
QuestionHow to send a E mail using C#? Pin
pubududilena26-Jun-05 22:56
pubududilena26-Jun-05 22:56 
AnswerRe: How to send a E mail using C#? Pin
mav.northwind26-Jun-05 23:29
mav.northwind26-Jun-05 23:29 
Generalfile open check Pin
syseca_challenge26-Jun-05 22:25
syseca_challenge26-Jun-05 22:25 
GeneralRe: file open check Pin
mav.northwind26-Jun-05 22:53
mav.northwind26-Jun-05 22:53 
GeneralRe: file open check Pin
V.27-Jun-05 0:46
professionalV.27-Jun-05 0:46 
GeneralRe: file open check Pin
mav.northwind27-Jun-05 1:03
mav.northwind27-Jun-05 1:03 
GeneralRe: file open check Pin
syseca_challenge27-Jun-05 1:31
syseca_challenge27-Jun-05 1:31 
GeneralRe: file open check Pin
V.27-Jun-05 1:33
professionalV.27-Jun-05 1:33 
GeneralRe: file open check Pin
mav.northwind27-Jun-05 1:51
mav.northwind27-Jun-05 1:51 
GeneralRe: file open check Pin
syseca_challenge27-Jun-05 1:55
syseca_challenge27-Jun-05 1:55 
GeneralRe: file open check Pin
mav.northwind27-Jun-05 1:56
mav.northwind27-Jun-05 1:56 
GeneralRe: file open check Pin
syseca_challenge27-Jun-05 2:40
syseca_challenge27-Jun-05 2:40 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.