Experts Exchange connects you with the people and services you need so you can get back to work.
StreamReader reader = new StreamReader("file.txt");
while ((line = reader.ReadLine()) != null)
string lineParts = line.Split(',');
// Do what you want with lineParts array.
Open in new window
private System.String OrganizeFile(System.String myFilePath)
System.String temp = System.IO.File.ReadAllLines(myFilePath);
System.String output = new System.String[temp.Length];
for(System.Int32 i = 0; i < temp.Length; i++)
output[i] = temp[i].Split(',');
// The first "index" indicates the line, while the second indicates each value.
Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.
Have a better answer? Share it in a comment.
Please enter a first name
Please enter a last name
Must be at least 4 characters long.
Join and Comment
Need expert help—fast? Use the Help Bell for personalized assistance getting answers to your important questions.