Wednesday, May 5, 2010

C#: Exception in using () {...}

We know in C#, "using" will call Dispose() of the object at the end of its scope. What will happen if an exception happens? the Dispose() will still get called?

Yes.
When?
When the fist catch is met.

No comments:

Post a Comment