Dinesh Santhalingam

Dinesh Santhalingam

  • NA
  • 737
  • 367.5k

Read a text file to string

Jan 19 2017 7:47 AM
I read a text from a text file and stores in an Array.
  1. string[] lines = System.IO.File.ReadAllLines(@"D:\as\testingfile");  
 Here I stores the text file contents into the String array.The text file contains some empty lines .I want to skip the line and copy the content from the text file to string.Can anyone help me to solve this?

Answers (3)