I wonder how the try, catch, finally function works.
I know how try and catch works.

What I wonder is if the try block is successful then I know that the catch block doesn´t execute.

Is it true that the finally block doesn´t execute either ?

try
{
}
     catch(Exception^ ex)
     {
     }
 finally
 {
      ServicePointManager::ServerCertificateValidationCallback = orgCallback; 
 }

Recommended Answers

All 2 Replies

>Is it true that the finally block doesn´t execute either ?
The finally block always executes, whether an exception was thrown or not.

Okay, thank you !

>Is it true that the finally block doesn´t execute either ?
The finally block always executes, whether an exception was thrown or not.

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.