Microsoft Techies
Microsoft information center.
Showing posts with label
how to remove empty line when reading text file using C#
.
Show all posts
Showing posts with label
how to remove empty line when reading text file using C#
.
Show all posts
Wednesday, 30 September 2015
how to remove empty line when reading text file using C#
IEnumerable<string> lines = File.ReadLines().Where(line => line != "");
or
List<string> lines = File.ReadLines().Where(line => line != "").ToList();
Older Posts
Home
Subscribe to:
Posts (Atom)