日期:2014-05-20 浏览次数:20471 次
namespace ConsoleApplication5 { class Program { static void Main(string[] args) { using (StreamReader sr = new StreamReader("a.txt", Encoding.Default)) { char[] charArr = sr.ReadToEnd().Replace("\r\n", "\n").ToCharArray(); foreach (char item in charArr) { if (!item.Equals('\n')) { Console.WriteLine(item); } } } Console.Read(); } } }