Buy Questpond's video subscriptions on
huge discount
.
Online: 2897
Home
Articles
Interviews
Forums
For Beginners
Popular Questions
ITIL Career Advice
PMP Career Advice
Career Advices
Codes
Videos
ASP.NET
ASP.NET MVC
Android Intel XDK
Sql Server
AngularJS
Bootstrap
Backbone.JS
MongoDB
LESS (CSS)
jQuery
WPF
WWF
SSIS
LightSwitch
Tutorials
News
ASP.NET MVC
|
Be Interview Ready
|
Top Performers
|
DNF MVP
|
Top Posts
|
Winners
|
Subscribe
|
Catalogs
Welcome Guest !
Register
Login
Home
>
Interviews
>
C#
>
Loading ...
If i will write a piece of code in finaly block, will it execute if there is an exception in try block.
Posted by
Lakhangarg
on 2/26/2010 | Category:
C# Interview questions
| Views: 4362
Post
|
Interview FAQs
|
Exclusive Questions
|
Interview Home
Answer:
Yes, the code in finally block will execute.
Asked In:
Many Interviews |
Alert Moderator
Bookmark It
< Previous :
Can we create Web service in SQL Server 2005?
Next > :
What is the use of APP_NAME()?
Comments or Responses
Posted by:
SurajRane
on: 6/18/2010
This is true only if we provide catch block in between.
e.g.
try
{
throw new Exception("Exception");
}
catch
{
}
finally
{
// in this case finally will be executed
}
Now consider following situation
try{
throw new Exception("Exception");
}
finally
{
// this block will not be executed.
// program will be terminated in try block.
}
Login to post response
More Interview Questions by Lakhangarg
Which assembly is used for Mobile web application?
what namespace is used for the controls in a mobile web application?
How to get the number of quarter from given date?
How to get the year part from the given Date?
How to get the Day part from the given Date?
How to get the month value/month part from the given Date?
Can we use Oracle Database as source or destination Database in SSIS?
Name of the containers in SSIS?
Latest Interview Questions
What is the use of APP_NAME()?
What is the use of CHAR function?
Which function is used to know the database property in SQL Server.
How can we check the locks defined in a DB ?
What are the variuos lock types ?
What are the various transaction isolation levels ?
How to create an Object in JavaScript ?
Name the ROW-Valued-Functions in Full Text Search
More ...