What does it mean in .Net: try-catch block without any Exception as parameter for catch?
What does it mean in .Net: try-catch block without any Exception as parameter for
Share
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
It means the catch block will catch any exception.
It also means that you can’t do anything with the exception object as you don’t have a reference to it.
You may use this pattern when you genuinely don’t care about anyexception occuring (and don’t want to do anything with it), but generally you should avoid this style.