The Finally block is not really always guaranteed to get executed.
If any of these 3 special exceptions do happen, code in Finally won't be executed:
1) OutOfMemoryException,
2) StackOverFlowException
3) ExecutionEngineException
Those people fortunate who experience all of these exceptions.
That means you had created some global kernel objects, they will indeed hang around and may interfere when user restarts your app. BTW, if you see a code
like catch(Exception ex) {...} or catch{...}, tell the developer that he has committed a sin.
The idea and content taken from this site http://www.shitalshah.com/blog/SomeCoolNetNuggets.aspx
-------------------
Happy programming
Total Pageviews
Subscribe to:
Post Comments (Atom)
Blog Archive
Ideal SQL Query For Handling Error & Transcation in MS SQL
BEGIN TRY BEGIN TRAN --put queries here COMMIT; END TRY BEGIN CATCH IF @@TRANCOUNT>0 BEGIN SELECT @@ERROR,ERRO...
-
All we need to use the Custom paging in grid view without object data source. Here i am going to explain my code which is used in custom pa...
-
One of the common requests in ASP.NET is to submit a form when visitor hits an Enter key. That could be a case if, for example you want to m...
-
using System.Data; using System.Data.SqlClient; using System.Text; using System.IO; using iTextSharp.text; using iTextSharp.text.pdf; ...
No comments:
Post a Comment