| | |
beginners problem - files
Please support our C# advertiser: Intel Parallel Studio Home
![]() |
•
•
Join Date: Jul 2008
Posts: 39
Reputation:
Solved Threads: 4
huh?
I'm gonna guess what the heck you mean here, and hand you an answer.
I'm gonna guess what the heck you mean here, and hand you an answer.
C# Syntax (Toggle Plain Text)
List<string> a = new List<string>(); List<string> b = new List<string>(); using ( StreamReader reader = new StreamReader(File.OpenRead(FILE_PATH)) ) { string line = null; string[ ] parts = null; try { while ( (line = reader.ReadLine()) != null ) { if ( String.IsNullOrEmpty(line) ) continue; parts = line.Split(new char[ ] { '\t' }, StringSplitOptions.RemoveEmptyEntries); if ( parts.Length >= 1 ) { a.Add(parts[0]); if ( parts.Length >= 2 ) { b.Add(parts[1]); } } } } catch ( Exception exception ) { throw exception; } finally { reader.Close(); } }
![]() |
Similar Threads
- C++ Books (C++)
- I have a form problem (HTML and CSS)
- New To Linux? Not a Computer Genius? CLick->Here<-For Some Useful Info. (Getting Started and Choosing a Distro)
- Prog to list ASCII codes (beginners' stuff) (C)
Other Threads in the C# Forum
- Previous Thread: Windows application on a server
- Next Thread: How to protect my exe file in cd?
| Thread Tools | Search this Thread |
.net access activedirectory ado.net algorithm array barchart bitmap box broadcast buttons c# check checkbox client color combobox control conversion csharp custom database datagrid datagridview dataset datetime degrees development disabled displayingopenforms draganddrop drawing encryption enum event excel exectuable file files form format forms ftp function gdi+ httpwebrequest image index index-error input install java label list listbox listener mandelbrot math mathematics mouseclick mysql operator path photoshop picturebox pixelinversion post prime programming radians regex remote remoting richtextbox serialization server setup sleep socket sql statistics stream string table tcp text textbox thread time timer update user usercontrol validation visualstudio webbrowser windows winforms wpf xml





