1
Answer

How to terminate some or all functions in application

Rano AH

Rano AH

11y
856
1
Hello Vulpes and Sunny Kumar
hope you are both doing well :-)

If I need to terminate or stop processing one of some or all functions, what is the best way to do that.

Saying:

this.Close(); Or

Application.Exist(); Or

System.Environment.Exist (int exitCode); // I don't know how to know the ExitCode to pass it to the OS! Or


Maybe none of the above!? Do I need some other codes/functions  to check the status of the method that I need to terminate?


What if I need to cancel running the function that reads and rename multiple files.

In that case, if I press on cancel, what will happen to my processed files? will be deleted ?or what have been processed are done and I can find them "Processed already?


Answers (1)