finally block of exceptin catching : finally « Statement « Visual C++ .NET






finally block of exceptin catching

 
#include "stdafx.h"
using namespace System;

int main() {

try
   {
     // ...
   }
   catch( Exception^ )
   {
   }
   finally
   {
       Console::WriteLine("finally block!");
   }
}

   
  








Related examples in the same category

1.Exception Finally
2.Multiple finally blocks