Advertisement
Guest User

Untitled

a guest
Jul 28th, 2014
230
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C# 0.89 KB | None | 0 0
  1.   {
  2.                 string RareLog = e.Text.ToString();
  3.                 string path = MyAppPath.Trim() + "RareLog.txt";
  4.  
  5.                 if (!File.Exists(path))
  6.                 {
  7.                     // Create a file to write to.
  8.                     using (StreamWriter sw = File.CreateText(path))
  9.                     {
  10.                         sw.WriteLine("On " + DateTime.Now.ToShortDateString() + " at " + DateTime.Now.ToShortTimeString() + " a Rare was found : " + RareLog);
  11.                        
  12.                     }
  13.  
  14.                 }
  15.                 if (File.Exists(path))
  16.                     using (StreamWriter sw = File.CreateText(path))
  17.                     {
  18.                         sw.WriteLine("On " + DateTime.Now.ToShortDateString() + " at " + DateTime.Now.ToShortTimeString() + " a Rare was found : " + RareLog);
  19.                        
  20.                     }
  21.  
  22.             }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement