Use static Directory
class instead. It returns files as strings instead of instantiating FileInfo
instances which you don't need
string[] files = Directory.GetFiles(pathToDirectory);
If you want just file names without path, then use Path
to get rid of directory path:
var fileNames = Directory.GetFiles(pathToDirectory)
.Select(Path.GetFileName);