Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Chriss Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Does using dispose after exception

Status
Not open for further replies.

fawkes

Technical User
Sep 12, 2003
343
GB
Here's a newbie question for you.

If an exception is thrown while in a using block and the exception is not handled within the using block is the object still disposed?
 
Yes the object is disposed when the using block is exited, whether through normal termination or an exception.





I used to rock and roll every night and party every day. Then it was every other day. Now I'm lucky if I can find 30 minutes a week in which to get funky. - Homer Simpson

Arrrr, mateys! Ye needs ta be preparin' yerselves fer Talk Like a Pirate Day!
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top