TECHNOLOGIES
FORUMS
JOBS
BOOKS
EVENTS
INTERVIEWS
Live
MORE
LEARN
Training
CAREER
MEMBERS
VIDEOS
NEWS
BLOGS
Sign Up
Login
No unread comment.
View All Comments
No unread message.
View All Messages
No unread notification.
View All Notifications
Answers
Post
An Article
A Blog
A News
A Video
An EBook
An Interview Question
Ask Question
Forums
Monthly Leaders
Forum guidelines
shooff27
NA
3
0
Read and parse comma-delimited file
Dec 16 2003 3:51 PM
Read and parse comma-delimited file i need away to read from the end of the file to the begining instead of begining to end as this code does can anyone help me using System; using System.IO; public class rev { public static void Main(string[] a) { string line; string[] strings = new string[100]; char[] separate = {','}; int i, lineNum; if (a.Length != 1) { Console.WriteLine("Usage: prog.exe filename.filetype"); return; } StreamReader file = new StreamReader(a[0]); lineNum = 0; Console.WriteLine(); while ((line = file.ReadLine()) != null) { ++lineNum; i = 0; foreach (string arg in line.Split(separate)) { i++; strings[i] = arg.Trim(); Console.WriteLine("Line {0}, token{1}: {2}", lineNum, i, strings[i]); } Console.WriteLine(); } file.Close(); } }
Reply
Answers (
3
)
structs and strings
Using Cards32.dll