can anyone tell me how to read from a text file, line by line....
techstu 0 Newbie Poster
Recommended Answers
Jump to PostSample code:
StreamReader sr = null; FileStream file = null; string fileData = String.Empty; try { file = new FileStream("test.txt", FileMode.Open, FileAccess.Read); sr = new StreamReader(file, Encoding.UTF8); string outputData = String.Empty; while (true) { string temp = String.Empty; temp = sr.ReadLine(); if (temp != null) { temp …
All 4 Replies
Reply to this topic Be a part of the DaniWeb community
We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.