For me, it doesn't:
DirectoryInfo dir = new DirectoryInfo(@"D:\Temp");
FileInfo[] y = dir.GetFiles();
List<string> asx = y.Select(p => new { File = p.DirectoryName + p.Name }.ToString()).ToList();
It returns an array of strings:
foreach (string s in asx)
{
Console.WriteLine(s);
}
Prints:
{ File = D:\TempAA.TXT }
{ File = D:\TempAAdel.jpg }
{ File = D:\TempMyIP.aspx }
{ File = D:\TempMyPic.jpg }
{ File = D:\TempMyText.txt }
{ File = D:\TempTestingSQLite.sldb }
{ File = D:\TempThumbs.db }}
So what am I doing that you aren't, or vice versa?
BTW: You probably want to add a "\\" in there, between the directory and file names.