Advertisement
GeneralGDA

Bad C# Code

Mar 8th, 2019
520
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C# 0.28 KB | None | 0 0
  1. const string fileName = "tmp.tmp";
  2.  
  3. byte[] dataToWrite = new byte[] { 0, 1, 0, 1 };
  4.  
  5. FileStream file = new FileStream(fileName, FileMode.Create);
  6.  
  7. file.Write(dataToWrite, 0, dataToWrite.Length);
  8.  
  9. System.GC.Collect();
  10. System.GC.WaitForPendingFinalizers();
  11.  
  12. File.Delete(fileName);
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement