What is the output of the following program ?
0 of 1 questions completed
Please click button below to answer the quiz.
You have already completed the quiz before. Hence you can not start it again.
Quiz is loading...
You must sign in or sign up to start the quiz.
You have to finish following quiz, to start this quiz:
0 of 1 questions answered correctly
Time has elapsed
Reference books, you may like:Programming WCF Services: Design and Build Maintainable Service-Oriented Systems
WCF Multi-Layer Services Development with Entity Framework, 4th Edition
Learning WCF: A Hands-on Guide
You have reached 0 of 0 points, (0)
Choose correct answer from options below :Correct
Great !! You got it right!!Incorrect
Well, You are not alone.. lot of people got this wrong
Answer is “Hello World”
This is a twist to your usual Hello World program.
The program contains two WriteLine statements: one in a try block and the other in
the corresponding finally block.
The try block executes its WriteLine and finishes
execution prematurely by calling Environment.exit.
At this point, you might expect control to transfer to the finally block.
If you tried the program, though,you found that it never can say goodbye: It prints only Hello world.
It is true that a finally block is executed when a try block completes execution whether normally or abruptly.
In this program, however, the try block does not complete execution at all. The ENvironment.exit method halts the execution of
the current thread and all others dead in their tracks.
© 2015 – 2016, admin. All rights reserved.