Advertisement
Guest User

Untitled

a guest
Mar 29th, 2017
42
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.73 KB | None | 0 0
  1. private bool Change(string strFile)
  2. {
  3. bool flag;
  4. try
  5. {
  6. using (FileStream stream = new FileStream(strFile, FileMode.Open, FileAccess.ReadWrite))
  7. {
  8. stream.Position = stream.Length;
  9. byte[] array = null;
  10. Array.Resize<byte>(ref array, 1);
  11. stream.Write(array, 0, 1);
  12. stream.Flush();
  13. stream.Close();
  14. }
  15. flag = true;
  16. }
  17. catch (Exception exception1)
  18. {
  19. ProjectData.SetProjectError(exception1);
  20. Exception exception = exception1;
  21. flag = false;
  22. ProjectData.ClearProjectError();
  23. }
  24. return flag;
  25. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement