asp.net list all files in folder

C#
string[] allfiles = Directory.GetFiles("path/to/dir", "*.*", SearchOption.AllDirectories);
Source

Also in C#: