C# Tutorials and offshore development in India
    Tutorials   Resources   Forum   Communities   Interview   Jobs   Projects   Offshore Development    
Silverlight Tutorials | Mentor | Code Converter | Articles | Code Factory | Computer Jokes | Members | Peer Appraisal | IT Companies | Bookmarks | Revenue Sharing |


Prizes & Awards
My Profile



Active Members
TodayLast 7 Days more...

New Feature: Community Sites: Create your own .NET community website and start earning from Google AdSense ! It's Free !




ist possible to catch error inside finally block?


Posted Date: 07 Oct 2008      Total Responses: 2

Posted By: Vinod Krishna       Member Level: Gold     Points: 1


hi



Responses

Author: loki    07 Oct 2008Member Level: BronzeRating:     Points: -20
Hi,

1 try
2 {
3 // Open I/O source stream
4 try
5 {
6 // Open I/O destination stream
7 try
8 {
9 // Buffer data from source to destination
10 }
11 catch (Exception ex)
12 {
13 // User-friendly feedback - "transfer has failed"
14 }
15 }
16 catch (Exception ex)
17 {
18 // User-friendly feedback - "opening destination stream failed"
19 }
20 finally
21 {
22 // if needed, close destination stream
23 }
24 }
25 catch (Exception ex)
26 {
27 // User-friendly feedback - "opening source stream failed"
28 }
29 finally
30 {
31 // if needed, close source stream
32 }


finally block contains cleanup routines for exception situations.

loki.


Author: Meetu Choudhary    07 Oct 2008Member Level: GoldRating:     Points: 3
finally block is executed after the try catch and it is executed whether error occurs or not so the tasks which we like to perform whether the error occurred or not we perform there

--
Thanks and Regards
Meetu Choudhary



Post Reply
You must Sign In to post a response.
Next : what is sql injuction?
Previous : SMTP Server
Return to Discussion Forum
Post New Message
Category: ASP.NET

Related Messages



dotNet Slackers   BizTalk Adaptors    Web Design

it outsourcing

Contact Us    Privacy Policy    Terms Of Use