//string filepath = "c://test.txt";
//StreamWriter sw = new StreamWriter(filepath ,true ,System .Text .Encoding .Default );
//sw.WriteLine(list.ToString ());
//sw.Flush();
//sw.Close();不对,写成System.Collections.ArrayList了
//StreamWriter sw = new StreamWriter(filepath ,true ,System .Text .Encoding .Default );
//sw.WriteLine(list.ToString ());
//sw.Flush();
//sw.Close();不对,写成System.Collections.ArrayList了
string filename = "e:/";
Gettree(filename, 0);
string filepath = "g://fish.txt";
StreamWriter sw = new StreamWriter(filepath, true, System.Text.Encoding.Default); for (int i = 0; i < list.Count-1;i ++)
{ sw.WriteLine(Convert.ToString(list [i]));
}
sw.WriteLine(list);
sw.Flush();
sw.Close();
比较丑,高手帮忙优化下