fork download
  1. using System;
  2. using System.Collections.Generic;
  3. using System.Linq;
  4. using System.Text;
  5.  
  6. namespace ConsoleApplication1
  7. {
  8. class Program
  9. {
  10. static void Main(string[] args)
  11. {
  12. string hoge = "./hoge.txt";
  13. string hage = "./hage.txt";
  14. //Console.Write("Start " + hoge + " MoveTo" + hoge + ".wk");
  15. //Console.ReadLine();
  16.  
  17. System.IO.FileInfo f1 = new System.IO.FileInfo(hoge);
  18. f1.MoveTo(hoge + ".wk");
  19.  
  20. //Console.Write("Start " + hage + " MoveTo" + hoge);
  21. //Console.ReadLine();
  22. // while (true)
  23. // if (System.IO.File.Exists(hoge) == false) break;
  24. System.IO.FileInfo f2 = new System.IO.FileInfo(hage);
  25. f2.MoveTo(hoge);
  26.  
  27. //Console.Write("Delete " + hoge + ".wk");
  28. //Console.ReadLine();
  29.  
  30. System.IO.FileInfo f3 = new System.IO.FileInfo(hoge + ".wk");
  31. f3.Delete();
  32.  
  33. Console.Write("Exit");
  34. Console.ReadLine();
  35. }
  36. }
  37. }
  38.  
Not running #stdin #stdout 0s 0KB
stdin
Standard input is empty
stdout
Standard output is empty