If we write return statement in finally block will it works
fine or throws any error?



If we write return statement in finally block will it works fine or throws any error?..

Answer / alb.shah

Answer Is NO. We cannot have return in finally block...
we get the following error.
Control cannot leave the body of a finally clause
returns void, a return keyword must not be followed by an
object expression

Is This Answer Correct ?    14 Yes 0 No

Post New Answer

More ASP.NET Interview Questions

Can we make a class with class with same;suppose public class abc { public class abc { } }

1 Answers  


Can you give an example of what might be best suited to place in the Application_Start and Session_Start subroutines?

2 Answers   Siebel Systems,


What are the different web pages?

0 Answers  


How could you modify xaml content from javascript?

0 Answers  


Difference between viewstate, cache, session

2 Answers   Mind Tree,


Describe the difference between inline and code behind?

2 Answers  


What are the Difference between asp.net and asp ?

0 Answers  


SessionState - type of sessionstate and when and how to use it

1 Answers   Syntel,


Can the dictionary object be created in client?s scope ?

0 Answers   Satyam,


What is the difference between Server.Transfer and Response.Redirect? Why would I choose one over the other?

3 Answers   Satyam,


How to upload a file using file upload control inside the Update Panel???

2 Answers  


Is asp.net mvc still used? : Asp.Net MVC

0 Answers  


Categories