fork download
  1. public static class Searcher{
  2. public static string[] SearchAll(string path)
  3. {
  4. return Directory.GetFiles(path);
  5. }
  6. public static string[] SearchImgs(string path)
  7. {
  8. return Directory.GetFiles(path).Where(f => f.EndsWith(".jpg") ||f.EndsWith(".png")).ToArray();
  9. }
  10.  
  11. public static string[] SearchText(string path)
  12. {
  13. return Directory.GetFiles(path).Where(f => f.EndsWith(".txt")).ToArray();
  14. }
  15. }
  16.  
  17.  
Compilation error #stdin compilation error #stdout 0s 0KB
stdin
Standard input is empty
compilation info
prog.cs(4,20): error CS0103: The name `Directory' does not exist in the current context
prog.cs(8,20): error CS0103: The name `Directory' does not exist in the current context
prog.cs(13,20): error CS0103: The name `Directory' does not exist in the current context
error CS5001: Program `prog.exe' does not contain a static `Main' method suitable for an entry point
Compilation failed: 4 error(s), 0 warnings
stdout
Standard output is empty