日期:2014-05-17 浏览次数:20703 次
string[] files = new string[] { "c:\\1.cvs", "c:\\2.cvs" };
System.IO.StreamWriter writer = new System.IO.StreamWriter("c:\\new.cvs");
foreach (string filename in files)
{
System.IO.StreamReader reader = new System.IO.StreamReader(filename);
while (!reader.EndOfStream)
{
writer.WriteLine(reader.ReadLine());
}
}
writer.Close();
FileStream aFile = new FileStream("Log.txt",FileMode.Open);
StreamReader sr = new StreamReader(aFile);
strLine = sr.ReadLine();
while(strLine != null)
{
Console.WriteLine(strLine);