using-equivalence - The control structure 'using' defined by 'try-finally'. | Lecture 10 - slide 7 : 40 Program 1 |
// The using statement ... using (type variable = initializer) body // ... is equivalent to the following try-finally statement {type variable = initializer; try { body } finally { if (variable != null) ((IDisposable)variable).Dispose(); } }