Hi,
Nice info. Just mentioned in your code, For DirectoryInfo using the following namespace -->
Using System.IO.
One more thing to get files from that folder using the below code...
DirectoryInfo dd= new DirectoryInfo("D:\\image\\");
FileInfo[] file = dd.GetFiles();