![]() |
| ||
| cast text file to an array Newbie question; How do I cast a text file to an array, after the file is read using StreamReader? I have read many threads, code etc but I really need my hand held here, I just dont get it (especially using windows forms)...this is part of an assignment.... I've been going around in circle's over this for the last week...and I'm a desperate now. Your help would be appreciated. this code works as it is, but I don't have an array (not an arraylist cause no manipulation required) string fileName = ""; |
| ||
| Re: cast text file to an array does some-one know what I'm doing wrong here? foreach (string content in OpenFile.FileNames)//sends opened file to variable. |
| ||
| Re: cast text file to an array Yeah...Worked it out!, most of the stuff I discovered right here in DaniWeb...all that after scolling the net for the past...ages(I won't give actual time spent going around in circles trying to work it out prior to coming to DaniWeb, way too embrassing). Well now on to part 2, 3 and documentation OOPs. so, after all that here it is TextReader sr = new StreamReader(fileName); |
| All times are GMT -4. The time now is 1:41 pm. |
Forum system based on vBulletin Copyright ©2000 - 2009, Jelsoft Enterprises Ltd.
©2003 - 2009 DaniWeb® LLC