Why it is not advised (in a best pratice meaning) to manage all the exceptions of a system from the entry point.
class Program
{
static void Main(string[] args)
{
try
{
[...]//all the program stuff
}catch(Exception ex)
{
[...]
}
}
}
edit :
in a second point does it change something for the performance?
It’s not advised in the meaning that you should catch exceptions in places where you can actually handle them in a useful way.
If there is nothing you can do about the exception but crash, your solution works, but consider for example a missing file giving you an exception. Would you rather handle it with a dialog in the “OpenFile” method (or in this case maybe the part of the method where you open the file) and possibly give the user a chance to browse to where the file is before proceeding, or would you rather have it throw back to main and have no real option except “log and crash”?