if (Directory.Exists(path))
{
string[] name = Directory.GetFiles(path);
foreach (string item in name)
{
file += item + "---";
}
}
原文:http://www.cnblogs.com/123ing/p/3809762.html