Advertisement
Guest User

codex#

a guest
Jul 5th, 2015
209
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.63 KB | None | 0 0
  1. if (File.Exists(binaryFilePath))
  2. {
  3. Program.DisplayMessage("The file: " + binaryFileName + " exist. You want to overwrite it? Y/N");
  4. string overwrite = Console.ReadLine();
  5. while (overwrite != null)
  6. {
  7. if (overwrite.ToUpper() == "Y")
  8. {
  9. WriteBinaryFile(frameCodes, binaryFilePath);
  10.  
  11. } if (overwrite.ToUpper() == "N")
  12. {
  13. throw new IOException();
  14. overwrite = null;
  15. } if (overwrite.ToUpper() != "Y" && overwrite.ToUpper() != "N")
  16. {
  17. Program.DisplayMessage("!!Please Select a Valid Option!!");
  18. overwrite = Console.ReadLine();
  19. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement